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

476 lines
18 KiB
Plaintext

# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2014-2022, Juan Linietsky, Ariel Manzur and the Godot community (CC-BY 3.0)
# This file is distributed under the same license as the Godot Engine package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine 3.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-09-09 16:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:4
msgid "Spawning monsters"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:6
msgid "In this part, we're going to spawn monsters along a path randomly. By the end, you will have monsters roaming the game board."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:9
msgid "|image0|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:336
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:336
msgid "image0"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:11
msgid "Double-click on ``Main.tscn`` in the *FileSystem* dock to open the *Main* scene."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:13
msgid "Before drawing the path, we're going to change the game resolution. Our game has a default window size of ``1024x600``. We're going to set it to ``720x540``, a nice little box."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:17
msgid "Go to *Project -> Project Settings*."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:19
msgid "|image1|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:337
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:337
msgid "image1"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:21
msgid "In the left menu, navigate down to *Display -> Window*. On the right, set the *Width* to ``720`` and the *Height* to ``540``."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:24
msgid "|image2|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:338
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:338
msgid "image2"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:27
msgid "Creating the spawn path"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:29
msgid "Like you did in the 2D game tutorial, you're going to design a path and use a *PathFollow* node to sample random locations on it."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:32
msgid "In 3D though, it's a bit more complicated to draw the path. We want it to be around the game view so monsters appear right outside the screen. But if we draw a path, we won't see it from the camera preview."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:36
msgid "To find the view's limits, we can use some placeholder meshes. Your viewport should still be split into two parts, with the camera preview at the bottom. If that isn't the case, press :kbd:`Ctrl + 2` (:kbd:`Cmd + 2` on macOS) to split the view into two. Select the *Camera* node and click the *Preview* checkbox in the bottom viewport."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:42
msgid "|image3|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:339
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:339
msgid "image3"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:45
msgid "Adding placeholder cylinders"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:47
msgid "Let's add the placeholder meshes. Add a new *Spatial* node as a child of the *Main* node and name it *Cylinders*. We'll use it to group the cylinders. As a child of it, add a *MeshInstance* node."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:51
msgid "|image4|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:340
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:340
msgid "image4"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:53
msgid "In the *Inspector*, assign a *CylinderMesh* to the *Mesh* property."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:55
msgid "|image5|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:341
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:341
msgid "image5"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:57
msgid "Set the top viewport to the top orthogonal view using the menu in the viewport's top-left corner. Alternatively, you can press the keypad's 7 key."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:60
msgid "|image6|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:342
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:342
msgid "image6"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:62
msgid "The grid is a bit distracting for me. You can toggle it by going to the *View* menu in the toolbar and clicking *View Grid*."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:65
msgid "|image7|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:343
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:343
msgid "image7"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:67
msgid "You now want to move the cylinder along the ground plane, looking at the camera preview in the bottom viewport. I recommend using grid snap to do so. You can toggle it by clicking the magnet icon in the toolbar or pressing Y."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:71
msgid "|image8|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:344
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:344
msgid "image8"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:73
msgid "Place the cylinder so it's right outside the camera's view in the top-left corner."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:76
msgid "|image9|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:345
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:345
msgid "image9"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:78
msgid "We're going to create copies of the mesh and place them around the game area. Press :kbd:`Ctrl + D` (:kbd:`Cmd + D` on macOS) to duplicate the node. You can also right-click the node in the *Scene* dock and select *Duplicate*. Move the copy down along the blue Z axis until it's right outside the camera's preview."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:83
msgid "Select both cylinders by pressing the :kbd:`Shift` key and clicking on the unselected one and duplicate them."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:86
msgid "|image10|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:346
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:346
msgid "image10"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:88
msgid "Move them to the right by dragging the red X axis."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:90
msgid "|image11|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:347
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:347
msgid "image11"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:92
msgid "They're a bit hard to see in white, aren't they? Let's make them stand out by giving them a new material."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:95
msgid "In 3D, materials define a surface's visual properties like its color, how it reflects light, and more. We can use them to change the color of a mesh."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:98
msgid "We can update all four cylinders at once. Select all the mesh instances in the *Scene* dock. To do so, you can click on the first one and Shift click on the last one."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:102
msgid "|image12|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:348
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:348
msgid "image12"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:104
msgid "In the *Inspector*, expand the *Material* section and assign a *SpatialMaterial* to slot *0*."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:107
msgid "|image13|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:349
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:349
msgid "image13"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:109
msgid "Click the sphere icon to open the material resource. You get a preview of the material and a long list of sections filled with properties. You can use these to create all sorts of surfaces, from metal to rock or water."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:113
msgid "Expand the *Albedo* section and set the color to something that contrasts with the background, like a bright orange."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:116
msgid "|image14|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:350
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:350
msgid "image14"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:118
msgid "We can now use the cylinders as guides. Fold them in the *Scene* dock by clicking the grey arrow next to them. Moving forward, you can also toggle their visibility by clicking the eye icon next to *Cylinders*."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:122
msgid "|image15|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:351
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:351
msgid "image15"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:124
msgid "Add a *Path* node as a child of *Main*. In the toolbar, four icons appear. Click the *Add Point* tool, the icon with the green \"+\" sign."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:127
msgid "|image16|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:352
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:352
msgid "image16"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:129
msgid "You can hover any icon to see a tooltip describing the tool."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:131
msgid "Click in the center of each cylinder to create a point. Then, click the *Close Curve* icon in the toolbar to close the path. If any point is a bit off, you can click and drag on it to reposition it."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:135
msgid "|image17|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:353
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:353
msgid "image17"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:137
msgid "Your path should look like this."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:139
msgid "|image18|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:354
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:354
msgid "image18"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:141
msgid "To sample random positions on it, we need a *PathFollow* node. Add a *PathFollow* as a child of the *Path*. Rename the two nodes to *SpawnPath* and *SpawnLocation*, respectively. It's more descriptive of what we'll use them for."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:145
msgid "|image19|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:355
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:355
msgid "image19"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:147
msgid "With that, we're ready to code the spawn mechanism."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:150
msgid "Spawning monsters randomly"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:152
msgid "Right-click on the *Main* node and attach a new script to it."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:154
msgid "We first export a variable to the *Inspector* so that we can assign ``Mob.tscn`` or any other monster to it."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:157
msgid "Then, as we're going to spawn the monsters procedurally, we want to randomize numbers every time we play the game. If we don't do that, the monsters will always spawn following the same sequence."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:190
msgid "We want to spawn mobs at regular time intervals. To do this, we need to go back to the scene and add a timer. Before that, though, we need to assign the ``Mob.tscn`` file to the ``mob_scene`` property."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:194
msgid "Head back to the 3D screen and select the *Main* node. Drag ``Mob.tscn`` from the *FileSystem* dock to the *Mob Scene* slot in the *Inspector*."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:197
msgid "|image20|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:356
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:356
msgid "image20"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:199
msgid "Add a new *Timer* node as a child of *Main*. Name it *MobTimer*."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:201
msgid "|image21|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:357
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:357
msgid "image21"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:203
msgid "In the *Inspector*, set its *Wait Time* to ``0.5`` seconds and turn on *Autostart* so it automatically starts when we run the game."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:206
msgid "|image22|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:358
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:358
msgid "image22"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:208
msgid "Timers emit a ``timeout`` signal every time they reach the end of their *Wait Time*. By default, they restart automatically, emitting the signal in a cycle. We can connect to this signal from the *Main* node to spawn monsters every ``0.5`` seconds."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:213
msgid "With the *MobTimer* still selected, head to the *Node* dock on the right and double-click the ``timeout`` signal."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:216
msgid "|image23|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:359
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:359
msgid "image23"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:218
msgid "Connect it to the *Main* node."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:220
msgid "|image24|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:360
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:360
msgid "image24"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:222
msgid "This will take you back to the script, with a new empty ``_on_MobTimer_timeout()`` function."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:225
msgid "Let's code the mob spawning logic. We're going to:"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:227
msgid "Instantiate the mob scene."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:228
msgid "Sample a random position on the spawn path."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:229
msgid "Get the player's position."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:230
msgid "Call the mob's ``initialize()`` method, passing it the random position and the player's position."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:232
msgid "Add the mob as a child of the *Main* node."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:273
msgid "Above, ``randf()`` produces a random value between ``0`` and ``1``, which is what the *PathFollow* node's ``unit_offset`` expects."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:276
msgid "Here is the complete ``Main.gd`` script so far, for reference."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:328
msgid "You can test the scene by pressing :kbd:`F6`. You should see the monsters spawn and move in a straight line."
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:331
msgid "|image25|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:361
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:361
msgid "image25"
msgstr ""
#: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:333
msgid "For now, they bump and slide against one another when their paths cross. We'll address this in the next part."
msgstr ""
#: ../../docs/<rst_epilog>:0
msgid "Translation status"
msgstr ""