Skip to content

Add a visual clue to indicate the projectiles are about to dissapear - #2801

Open
Salonso928 wants to merge 3 commits into
endlessm:mainfrom
Salonso928:main
Open

Add a visual clue to indicate the projectiles are about to dissapear#2801
Salonso928 wants to merge 3 commits into
endlessm:mainfrom
Salonso928:main

Conversation

@Salonso928

@Salonso928 Salonso928 commented Aug 28, 2026

Copy link
Copy Markdown

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

image
Videocaptura.de.pantalla_20260827_193240.mp4

Fixes #2442

@Salonso928
Salonso928 requested review from a team as code owners August 28, 2026 00:46
@Salonso928 Salonso928 changed the title Add a visual clue to indicate the projectiles are about to dissapear #2442 Add a visual clue to indicate the projectiles are about to dissapear Issue#2442 Aug 28, 2026
@Salonso928 Salonso928 changed the title Add a visual clue to indicate the projectiles are about to dissapear Issue#2442 Add a visual clue to indicate the projectiles are about to dissapear Aug 28, 2026
@github-actions

Copy link
Copy Markdown

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 manuq left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@Salonso928

Copy link
Copy Markdown
Author

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.
Here is a video playing ink_combat_round_4.tscn

Videocaptura.de.pantalla_20260828_120009.mp4

@Salonso928
Salonso928 requested a review from manuq August 30, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Projectiles: add clue to indicate that they are about to disappear

2 participants