Skip to content

Commit 86c20b2

Browse files
authored
Merge pull request #9029 from skyace65/DodgeCreeps
Fix and update Dodge the Creeps Issues
2 parents 53d7d8b + 266e266 commit 86c20b2

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

getting_started/first_3d_game/05.spawning_mobs.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,20 @@ what the *PathFollow* node's ``progress_ratio`` expects:
269269
The path we have set is around the camera's viewport, so any random value between 0 and 1
270270
is a random position alongside the edges of the viewport!
271271

272+
Note that if you remove the ``Player`` from the main scene, the following line
273+
274+
.. tabs::
275+
.. code-tab:: gdscript GDScript
276+
277+
var player_position = $Player.position
278+
279+
.. code-tab:: csharp
280+
281+
Vector3 playerPosition = GetNode<Player>("Player").Position;
282+
283+
284+
gives an error because there is no $Player!
285+
272286
Here is the complete ``main.gd`` script so far, for reference.
273287

274288
.. tabs::

getting_started/first_3d_game/07.killing_player.rst

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -100,25 +100,6 @@ a ``die()`` function that helps us put a descriptive label on the code.
100100
Die();
101101
}
102102

103-
Try the game again by pressing :kbd:`F5`. If everything is set up correctly,
104-
the character should die when an enemy runs into the collider. Note that without a ``Player``, the following line
105-
106-
.. tabs::
107-
.. code-tab:: gdscript GDScript
108-
109-
var player_position = $Player.position
110-
111-
.. code-tab:: csharp
112-
113-
Vector3 playerPosition = GetNode<Player>("Player").Position;
114-
115-
116-
gives an error because there is no $Player!
117-
118-
Also note that the enemy colliding with the player and dying depends on the size and position of the
119-
``Player`` and the ``Mob``\ 's collision shapes. You may need to move them
120-
and resize them to achieve a tight game feel.
121-
122103
Ending the game
123104
---------------
124105

@@ -153,6 +134,10 @@ and the remaining ones will leave the screen.
153134
Notice also that the game no longer crashes or displays an error when the player dies. Because
154135
we are stopping the MobTimer, it no longer triggers the ``_on_mob_timer_timeout()`` function.
155136

137+
Also note that the enemy colliding with the player and dying depends on the size and position of the
138+
``Player`` and the ``Mob``\ 's collision shapes. You may need to move them
139+
and resize them to achieve a tight game feel.
140+
156141
You can pat yourself in the back: you prototyped a complete 3D game,
157142
even if it's still a bit rough.
158143

getting_started/first_3d_game/09.adding_animations.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ time in seconds.
4343
We want the animation to start playback automatically at the start of the game.
4444
Also, it should loop.
4545

46-
To do so, you can click the button with an "A>" icon in the animation toolbar
46+
To do so, you can click the autoplay button (|Autoplay|) in the animation toolbar
4747
and the looping arrows, respectively.
4848

4949
|image5|
@@ -271,7 +271,7 @@ should see the message "Global library will be created." Leave the text field bl
271271
click OK. Click the *Paste* icon (clipboard) and it should appear in the window. Click OK
272272
to close the window.
273273

274-
Next, make sure that the button with an "A>" icon (Autoplay on Load) and the looping
274+
Next, make sure that the autoplay button (|Autoplay|) and the looping
275275
arrows (Animation looping) are also turned on in the animation editor in the bottom panel.
276276
That's it; all monsters will now play the float animation.
277277

@@ -639,3 +639,4 @@ And the *Mob*'s script.
639639
.. |animation_final_keyframes| image:: img/09.adding_animations/animation_final_keyframes.webp
640640
.. |second_keys_both| image:: img/09.adding_animations/second_keys_both.webp
641641
.. |timeline_05_click| image:: img/09.adding_animations/timeline_05_click.webp
642+
.. |Autoplay| image:: img/09.adding_animations/
1.42 KB
Loading
180 Bytes
Loading

0 commit comments

Comments
 (0)