e07 - Loose Ends
Closed this issue · 2 comments
tylerecouture commented
Player damage
- Add stats node to Player
- Connect to you_died_signal in player (queue_free, "GAME OVER")
- In Enemy script damage the player:
state.ATTACKING:
var player_stats: Stats = player.get_node("Stats")
player_stats.take_hit(1)
print("I hit you!: ", player_stats.current_HP, "/", player_stats.max_HP)
- When player dies, breaks stuff!
tylerecouture commented
move_and_slide(Vector3.ZERO) (after returning after attack)
tylerecouture commented
-
ALso shooting not just using floor, but colliding with enemies and obstacles.
-
Label a new layer called "ground" and put the ground on it (also leave the ground on world layer)
-
Explain the "bit" value: it will be 8 (4th-bit), but if you wanted to add more layers, you need to add the values together.
in Main.gd:
var collision_mask = 8
var intersection = space_state.intersect_ray(ray_origin, ray_target, [], collision_mask)