@@ -22,7 +22,9 @@ Click Scene -> New Scene from the top menu and add the following nodes:
2222 - :ref: `VisibleOnScreenNotifier2D <class_VisibleOnScreenNotifier2D >`
2323
2424Don't forget to set the children so they can't be selected, like you did with
25- the Player scene.
25+ the Player scene. This is done by selecting the parent node (``RigidBody2D ``) in the
26+ Scene tree dock, then using the :button: `Group ` button at the top of the 2D editor
27+ (or pressing :kbd: `Ctrl + G `).
2628
2729Select the ``Mob `` node and set its ``Gravity Scale ``
2830property in the :ref: `RigidBody2D <class_RigidBody2D >`
@@ -102,9 +104,9 @@ First, we get the list of animation names from the AnimatedSprite2D's ``sprite_f
102104property. This returns an Array containing all three animation names: ``["walk",
103105"swim", "fly"] ``.
104106
105- In the GDScript code, we use the :ref: `Array.pick_random <class_Array_method_pick_random >` method
106- to select one of these animation names at random. Meanwhile, in the C# code, we pick a random number
107- between ``0 `` and ``2 `` to select one of these names from the list (array indices start at ``0 ``). The
107+ In the GDScript code, we use the :ref: `Array.pick_random <class_Array_method_pick_random >` method
108+ to select one of these animation names at random. Meanwhile, in the C# code, we pick a random number
109+ between ``0 `` and ``2 `` to select one of these names from the list (array indices start at ``0 ``). The
108110expression ``GD.Randi() % n `` selects a random integer between ``0 `` and ``n-1 ``.
109111
110112Finally, we call ``play() `` to start playing the chosen animation.
0 commit comments