You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 17d74b8
Browse filesBrowse the repository at this point in the historyBrowse files
Create a new folder inside the resources folder and name it **scenes**.
80
+
Create a new folder inside the Resources folder and name it **scenes**.
81
81
82
82
Now press <kbd>ctrl</kbd> + <kbd>s</kbd> on your keyboard to bring up the Save menu and click on the **scenes** folder, then "Save" to save your new scene to the **scenes** folder.
83
83
@@ -86,22 +86,26 @@ Now press <kbd>ctrl</kbd> + <kbd>s</kbd> on your keyboard to bring up the Save m
86
86
Now we have all the groundwork set up, your file manager in the bottom left should look something like:
We can do the same thing with the rest of the assets, you can even drag in the same asset multiple times, and it’ll be numbered accordingly. Here’s mine; try to get yours somewhat similar, as it will make it easier to follow along:
96
+
We can do the same thing with the rest of the assets and build a simple room like I've shown in the video below.
97
+
98
+
{/* mapBuilding.mp4 */}
99
+
100
+
If you encounter an issue where you can't see the item you placed, make sure that it is either below or attached to the background image. Below is the room I made, but as long as you have some items in your room like in the video above, you should be good!
Make sure to also drag in the asset called “E”, next to each of the objects you have placed. Make sure to drag the Es under the object you are placing them next to in the left panel, Here’s how I have it setup:
104
+
Make sure to also drag in the asset called “E”, next to each of the objects you have placed. Make sure each E is a child of the object it belongs to in the Scene panel, Here’s how I have it setup:
Now, we also need to add labels for the text that will appear when we interact with an object. Click on an object in the left panel, then press <kbd>ctrl</kbd> + <kbd>a</kbd>, search for “label” and add it. Now click on your new label node, and in its right panel you should see a box to type text. Add whatever text you want to see when you interact with that object, and move the text on top of the black bar.
108
+
Now, we also need to add labels for the text that will appear when we interact with an object. Click on an object in the left panel, then press <kbd>Ctrl</kbd> + <kbd>A</kbd> (Add Child Node), search for “label” and add it. Now click on your new label node, and in its right panel you should see a box to type text. Add whatever text you want to see when you interact with that object, and move the text on top of the black bar.
105
109
106
110
It should look something like this:
107
111
@@ -115,6 +119,36 @@ Make sure to add a label for the other objects, so you can have different text f
Before I move on to collision shapes, I will quickly go over making a simple character in Godot.
125
+
126
+
First make a new scene by clicking the plus icon near the tabs at the top.
127
+
128
+
{/* addingNewScene.png */}
129
+
130
+
Now press <kbd>Ctrl</kbd> + <kbd>A</kbd> and search for CharacterBody2D and select it.
131
+
132
+
{/* addCharacterBody2D.png */}
133
+
134
+
Now click on the CharacterBody2D you added in the left panel, and add a CollisionShape2D and a Sprite2D to it. They will appear as child nodes to the character body as shown below.
135
+
136
+
{/* charHierarchy.png */}
137
+
138
+
With that done, follow the video below to setup the collision shape and sprite for your character. The image I'm using for the character sprite is **boyGhostSingle.png**.
139
+
140
+
{/* characterMaking.mp4 */}
141
+
142
+
Now the last thing we need to do is add a movement script to the character. Click the button shown below.
143
+
144
+
{/* scriptAttach */}
145
+
146
+
Then make sure that the basic movement script is selected, then press create.
147
+
148
+
{/* moveScript */}
149
+
150
+
Now save it to the scenes folder, and name it "blobGhostPlayer" as it will be easy to follow along when we get to the code section.
151
+
118
152
With that set up, you can watch [this video](https://www.youtube.com/watch?v=3M3olvGE-EI) to set up a simple character in Godot, you can use the **boyGhostSingle.png** file for the texture. Make sure to save your character into the scenes folder.
119
153
120
154
Drag your character in like you have been doing for everything else, and bam, we’re done setting up the project. Now let’s move on to adding our interactive feature!
-If the player is inside an `Area2D`using the player_inside variable that we have been turning on and off
258
-
-The "interact" keyboard input
291
+
-Whether the player is inside the Area2D (tracked using the player_inside variable)
292
+
-Whether the player presses the interact action
259
293
260
294
Now, when I walk into an object's `Area2D` and press E, I see a description about that object in the game!
261
295
@@ -282,4 +316,6 @@ Thanks for following along, and I can’t wait to see the interactions you creat
282
316
283
317
### More Resources
284
318
285
-
-
319
+
- If you want to learn more about the cool stuff Area2D can do check out [this link](https://docs.godotengine.org/en/stable/classes/class_area2d.html)
320
+
- Here's a [short video](https://www.youtube.com/watch?v=3M3olvGE-EI) on character creation if you have trouble with any part of it
321
+
- The Github for Before I fade, the game this tutorial is based on is [here](https://github.com/vishyyyyyyyyy/before-i-fade), feel free to use the assets and try out your own mods and changes to practice your new skills
0 commit comments