Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.
First challenge. Invisible walls don't work.ram876Hello! I have a few problems in the first challenge. The player does not react to Invisible walls and Invisible walls do not disappear when the scene starts. And colliding with destroyed walls works. Or I'm asking the question early and it will be explained when we study tilemaps.21Jan. 01, 2025
Y Sorting issue on wallskazaHi! I'm having issue when using y sorting on the root node.
I have the scene tree configuration as follows:
- root node [Node2D](zindex 0 y sort enable on)
- Initial Room [Node2D](zindex 0 sort enable on)
- - RoomD2 Scene (zindex 1 sort enable on)
- - Player Scene (zindex 1 sort enable on)
With this configuration, the player always is drawing behind the walls on the RoomD2 Scene, regardless what i modify.
I'm sharing a video that shows my scene configuration if helps:
[https://filebin.net/ellb4zdzu98ks0m8/ysorting_issue_scene_configuration.mp4](https://filebin.net/ellb4zdzu98ks0m8/ysorting_issue_scene_configuration.mp4)
Can you help me with this configuration?60Feb. 05, 2025
Drawing order problemmilk_manNow back in M10-L7 under
> How can I make the hands draw behind the character when aiming up?
we were told that the character sprite Z index should be set to 2 and also write the following code:
```gdscript
z_index = 3
if aim_direction.y < 0.0:
z_index = 1
```
Now in this lesson, bc the character sprite z index is set to 2, the sprite always draws in front, even when going trough a wall. I can of course set it back to 0, but then the hands don't draw anymore behind the character when aiming up.
Is there a way to maintain the hands drawing behind the character when aiming up while also have drawing order within the level to work as it should?30Feb. 05, 2025
Manage multiple enemies attack patternequal-gnatHi, can we have a extra lecture about implementing a token system that manages multiple enemies which only a limited amount of ones can attack player simultaneously.
Similar ,The token system used in DOOM 2016 , Enemies request tokens to determine when they can attack and what kind of attacks they can use. Meaning that higher token usage allows for more enemies to attack the player simultaneously.
Doom gdc talk , 41 : 47
[https://youtu.be/2KQNpQD8Ayo?si=-NUGdyNZkf_Bu0Bh](https://youtu.be/2KQNpQD8Ayo?si=-NUGdyNZkf_Bu0Bh)30Feb. 04, 2025
Challenge idea: making the mobs more responsive to being shotHardRockIn the hints for the second challenge the basic nature of the mobs has been brought up. It bothered me that they don't retaliate against the player when being shot, but I didn't want to give them a huge detection range by default as that is unfair to the player.
With our current knowledge one simple solution to this is adjusting the detection range of the mobs after being shot and then resetting it with a timer. Here's how I did it:
1) Add a Timer node to the Mob scene.
2) In the Mob script connect the timeout signal of the Timer to a function that resets the scale of the mob's detection area:
```gdscript
search_timer.timeout.connect(
func() -> void:
detection_area.scale = Vector2.ONE
)
```
3) Increase the detection area when the mob gets hit. To achieve this, I added this code to the mob's set_health() function (for more complex enemies, state of alertness should probably not be handled here):
```gdscript
if new_health < health:
detection_area.scale = Vector2.ONE * 2
if (not search_timer.is_stopped()):
search_timer.stop()
search_timer.start()
```10Feb. 02, 2025
is there a simple method to make the shadows don't appear when over the background? Lucas PscheidtCurrently I am using a collision shape to do that but I would like another option if there is one, because my movements gets kinda limited close to walls because my collision is too downwards.10Jan. 11, 2025
Multi-level bridgesram876And how, in theory, can multi-level bridges be made. That is, the bridge path is arranged in a spiral and the player seems to rise, or another example: bridges go from room 1 to room 2 and from room 3 to room 4 (bridges A and B). These bridges seem to intersect, but if the player wants to get into room 4, he needs to go from room 2 to 3 and from there to 4 (bridge B is higher than bridge A).20Jan. 01, 2025
A question about sortingram876Hello! I don't understand how sorting works in rooms. If I manually move the character along the floor in the editor, the character is always above the floor in the display, but if I move it along the destroyed walls, then sorting is triggered and the character is displayed higher in front of the wall, and if you put the character behind the destroyed wall, the player will be behind him.60Jan. 01, 2025
The Bridges and Invisible Walls scenes does not existRuben TeijeiroI'm trying to find the scenes mentioned in the challenge:
> For the bridges and invisible walls, I prepared two scenes for you:
> bridges.tscn
> invisible_walls.tscn
but I can only find the tres elements instead:
res://levels/rooms/tilesets/tileset_invisible_walls.tres
res://levels/rooms/tilesets/tileset_bridges.tres20Dec. 09, 2024
An additional feature to add to the bulletiguessfiveIf you want the bullet to disappear when firing at bullets and not when the walls are invisible you can add this feature in the bullet scene and enable it to detect collision mask 2 or what the mask is set for the walls and props in your rooms.
If you want to figure it out yourself then pause here but this was my solution.
You can add this in the body entered in _ready function:
```gdscript
if body is TileMapLayer:
# Invisible walls visibility is false
if body.is_collision_enabled() and body.is_visible_in_tree():
queue_free()
```60Nov. 29, 2024
Lesson Q&A
Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.