Skip to content

Commit 45ba524

Browse files
committed
Improve Creating your first script page
- Add godot.svg icon according to comment. - Update link to intro section based on comment. - Update some styling to match current guidelines.
1 parent 058f0f6 commit 45ba524

File tree

3 files changed

+21
-15
lines changed

3 files changed

+21
-15
lines changed

getting_started/introduction/introduction_to_godot.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Software Development Kits (SDK) in the engine.
8484
Of course, you can also directly add modules and features to the engine, as it's
8585
completely free and open source.
8686

87-
.. doc_learning_programming
87+
.. _doc_introduction_learning_programming:
8888

8989
What do I need to know to use Godot?
9090
------------------------------------
Lines changed: 1 addition & 0 deletions
Loading

getting_started/step_by_step/scripting_first_script.rst

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- Giving a *short* and sweet hands-on intro to GDScript. The page should
55
focus on working in the code editor.
66
- We assume the reader has programming foundations. If you don't, consider
7-
taking the course we recommend in the :ref:`introduction to Godot page <doc_learning_programming>`.
7+
taking the course we recommend in the :ref:`introduction to Godot page <doc_introduction_learning_programming>`.
88

99
Techniques:
1010

@@ -19,9 +19,12 @@ Creating your first script
1919
==========================
2020

2121
In this lesson, you will code your first script to make the Godot icon turn in
22-
circles using GDScript. As we mentioned :ref:`in the introduction
23-
<toc-learn-introduction>`, we assume you have programming foundations.
24-
The equivalent C# code has been included in another tab for convenience.
22+
circles. As we mentioned :ref:`in the introduction
23+
<doc_introduction_learning_programming>`, we assume you have programming
24+
foundations.
25+
26+
This tutorial is written for GDScript, and the equivalent C# code is included in
27+
another tab of each codeblock for convenience.
2528

2629
.. image:: img/scripting_first_script_rotating_godot.gif
2730

@@ -37,10 +40,10 @@ Please :ref:`create a new project <doc_creating_and_importing_projects>` to
3740
start with a clean slate. Your project should contain one picture: the Godot
3841
icon, which we often use for prototyping in the community.
3942

40-
.. Godot icon
43+
.. image:: img/scripting_first_script_icon.svg
4144

4245
We need to create a Sprite2D node to display it in the game. In the Scene dock,
43-
click the Other Node button.
46+
click the **Other Node** button.
4447

4548
.. image:: img/scripting_first_script_click_other_node.webp
4649

@@ -54,7 +57,7 @@ Your Scene tab should now only have a Sprite2D node.
5457
.. image:: img/scripting_first_script_scene_tree.webp
5558

5659
A Sprite2D node needs a texture to display. In the Inspector on the right, you
57-
can see that the Texture property says "[empty]". To display the Godot icon,
60+
can see that the **Texture** property says ``<empty>``. To display the Godot icon,
5861
click and drag the file ``icon.svg`` from the FileSystem dock onto the Texture
5962
slot.
6063

@@ -73,15 +76,16 @@ Creating a new script
7376
---------------------
7477

7578
To create and attach a new script to our node, right-click on Sprite2D in the
76-
scene dock and select "Attach Script".
79+
Scene dock and select **Attach Script**.
7780

7881
.. image:: img/scripting_first_script_attach_script.webp
7982

80-
The Attach Node Script window appears. It allows you to select the script's
83+
The **Attach Node Script** window appears. It allows you to select the script's
8184
language and file path, among other options.
8285

83-
Change the Template field from "Node: Default" to "Object: Empty" to start with a clean file. Leave the
84-
other options set to their default values and click the Create button to create the script.
86+
Change the **Template** field from ``Node: Default`` to ``Object: Empty`` to
87+
start with a clean file. Leave the other options set to their default values and
88+
click the **Create** button to create the script.
8589

8690
.. image:: img/scripting_first_script_attach_node_script.webp
8791

@@ -246,9 +250,10 @@ our sprite's rotation every frame. Here, ``rotation`` is a property inherited
246250
from the class ``Node2D``, which ``Sprite2D`` extends. It controls the rotation
247251
of our node and works with radians.
248252

249-
.. tip:: In the code editor, you can Ctrl-click (Cmd-click on MacOS) on any built-in property or
250-
function like ``position``, ``rotation``, or ``_process`` to open the
251-
corresponding documentation in a new tab.
253+
.. tip:: In the code editor, you can :kbd:`Ctrl + Click` (:kbd:`Cmd + Click` on
254+
macOS) on any built-in property or function like ``position``,
255+
``rotation``, or ``_process`` to open the corresponding documentation
256+
in a new tab.
252257

253258
Run the scene to see the Godot icon turn in-place.
254259

0 commit comments

Comments
 (0)