Add a visual clue to indicate the projectiles are about to dissapear - #2801
Add a visual clue to indicate the projectiles are about to dissapear#2801Salonso928 wants to merge 3 commits into
Conversation
|
Play this branch at https://play.threadbare.game/branches/Salonso928/main/. (This launches the game from the start, not directly at the change(s) in this pull request.) |
manuq
left a comment
There was a problem hiding this comment.
The work you did looks good for the NO_EDIT_combat.tscn, which uses the NO_EDIT_projectile.tscn. But not with other projectiles, like ink_blob_projectile.tscn or any other projectile in StoryQuests.
I have more to comment about the visual clue (which is a great start, by the way), but let's fix this first!
| time_passed+=_delta | ||
| if time_passed>= time_to_dissapear && not is_dissapearing: | ||
| is_dissapearing=true | ||
| animation_player.play("dissapear") |
There was a problem hiding this comment.
This crashes the game if you play res://scenes/quests/lore_quests/quest_000/4_ink_combat/tutorial_ink_combat.tscn with:
E 0:00:08:038 projectile.gd:71 @ @implicit_ready(): Node not found: "%AnimationPlayer" (relative to "/root/TutorialInkCombat/InkBlobProjectile").
E 0:00:12:055 Projectile._process: Cannot call method 'play' on a null value.
…effect is only controlled by the projectile.gd script
|
Hi @manuq I made some changes. I removed the AnimationPlayer node, now the blink effect is only controlled by the projectile.gd script, therefore all the scenes that use this script should display the effect. Videocaptura.de.pantalla_20260828_120009.mp4 |
Affected scene: res://scenes/quests/template_quests/NO_EDIT/2_NO_EDIT_combat/NO_EDIT_combat_components/NO_EDIT_projectile.tscn
Affected script: res://scenes/game_elements/props/projectile/components/projectile.gd
When a projectile has spent the 80% of its duration, a dissapear animation will start. While this animation is playing the proyectile can be interacted with the repel comand and all Area2D nodes if posible, but this will no longer reset its duration.
An AnimationPlayer was added to the projectile scene and imported using the @onready annotation in the projectile.gd
Videocaptura.de.pantalla_20260827_193240.mp4
Fixes #2442