How To Display Damage Number Popups - Godot 4 Tutorial

  Рет қаралды 7,117

Aecert Gaming

Aecert Gaming

Күн бұрын

Пікірлер: 21
@geovin221
@geovin221 Жыл бұрын
For those who want to make this work for 3d (as he alludes to at the end): Change the Node2Ds to Spatials Change Label to Label3D Everywhere that says Vector2, change to Vector3 Provide a Vector3 as the position parameter (like global_translation). Set the global_translation of the damage number node to this On the tween, replace "position" as the modified variable to "global_translation" Again on the tween, where you replaced the target Vector2 to a Vector3 earlier, add another rand_range float for the z value like there is for the x value Also change the height from -height to height (don't need a negative y value for 3d)
@Snafuey
@Snafuey 2 жыл бұрын
Your tutorials are amazing. Thank you and keep up the good work!
@baylorw
@baylorw 4 ай бұрын
In 4.2 you can no longer animate alpha independently. You have to edit all of modulate. You can manually edit the property (add ":a" to the end) but it won't let you set the value as a float, you have to pick a color from the color picker. i like the way it looks in this 4.0 demo a lot better.
@dueddel
@dueddel 2 жыл бұрын
5:18 You still won't be able to actually animate a random value, but you could at least trigger the tweened and randomized movement via method calls in the animation player the same way as you have called the remove at the animation's end. Just a slightly different way to do what you already do … which already seems pretty smart for some reason I am not willing to write down right now, because I am tired as of writing this comment. 😅 The pool implementation is neat, by the way. Like it. 👍
@TechnoForce86
@TechnoForce86 Жыл бұрын
Thank you for the tutorial. I have one question. Why use a function call track instead of use the animation_finished signal? Is this only to not test the animation name in the case of we may want to define other behavior in the future?
@AviVajpeyi
@AviVajpeyi Жыл бұрын
Great vid! Im new to godot -- just wondering, could the entire animation be done via a tween? Is that not a recommended way of making the 'animation'? Not sure of the entire syntax, but, maybe something like: ``` tween.run_in_parallel() sec_for_fade_in = 0.2 sec_to_wait_before_fadeout = 0.2 sec_for_fade_out = 0.6 tween("modulate", start=0, stop=1, time=sec_for_fade_in) tween("scale", start=0, stop=1, time=sec_for_fade_in) # wait for sec_to_wait_before_fadeout tween("modulate", start=1, stop=0, time=sec_for_fade_out) tween("scale", start=1, stop=10 time=sec_for_fade_out) ``` I prefer coded solutions rather than working with anim controllers -- just wondering if this is a bad approach. Thanks!
@AecertGaming
@AecertGaming Жыл бұрын
I don't see why not! Give it a try and let me know how it goes, this will probably work great
@AviVajpeyi
@AviVajpeyi Жыл бұрын
@@AecertGaming Tweening seems to work! Had to use the `parallel()` to ensure that the movement + scaling happened at the same time. ``` func set_values_and_animate(value: String, start_pos: Vector2, height: float, spread: float, t_grow: float, t_shrink:float): label.text = value var tween = get_tree().create_tween() var end_pos = Vector2(randf_range(-spread, spread), -height) + start_pos popup_container.position = start_pos popup_container.scale = Vector2.ZERO tween.tween_property(popup_container, "position", end_pos, t_grow+t_shrink).set_trans(Tween.TRANS_LINEAR) tween.parallel().tween_property(popup_container, "scale", Vector2.ONE, t_grow).set_trans(Tween.TRANS_LINEAR) tween.tween_property(popup_container, "scale", Vector2.ZERO, t_shrink).set_trans(Tween.TRANS_LINEAR) tween.tween_callback(queue_free) ```
@foggydude
@foggydude Жыл бұрын
Is there a way to add up numbers if they're close to eachother? Instead of 10 popups with 1 I just wanna have 1 popup with 10.
@AecertGaming
@AecertGaming Жыл бұрын
No, but also kinda. What you can do is keep a running total of damage dealt, then display a number after a set amount of time. For example, every .1 seconds display a damage number for the total damage dealt during that time, instead of every instance of damage getting its own number.
@foggydude
@foggydude Жыл бұрын
@@AecertGaming Thanks, didn't think of that!
@P0RANT
@P0RANT 11 ай бұрын
getting "Invalid call. Nonexistent function 'instantiate' in base 'GDScript'." cudnt find any solution on web
@AecertGaming
@AecertGaming 11 ай бұрын
Are you using Godot 3?
@jasonromero6144
@jasonromero6144 9 ай бұрын
Downloaded the project from github and when running, clicking the mouse does not show any damage popups. Broken for Godot 4.0+??
@AecertGaming
@AecertGaming 9 ай бұрын
I'll take a look, idk. It might not work for the current Godot 4.0
@baylorw
@baylorw 4 ай бұрын
Yeah, pulling from GitHub into 4.2 doesn't work. That's because the 4.2 importer seems to delete all the points in the AnimationPlayer tracks which means they lose all their keyframes.
@fruitdudetv
@fruitdudetv Жыл бұрын
sad, thought there would be also a part on how to do it in 3D. struggling for months :D
@FrostFlag
@FrostFlag 9 ай бұрын
seems like you skipped a bunch of steps at the beginning? great video though
@AecertGaming
@AecertGaming 9 ай бұрын
such as?
@andreischapov4474
@andreischapov4474 9 ай бұрын
@@AecertGaming for example, the scaling animations. Looks non-trivial to setup for beginners - for example pivots seem to be wrong by default, so the numbers aren't centered when scaling up/down.
We made Vampire Survivors BUT in 10 Lines of Code
7:08
PlayWithFurcifer
Рет қаралды 1 МЛН
Did I make a Mistake switching from Unity to Godot?
5:16
Aarimous
Рет қаралды 75 М.
Friends make memories together part 2  | Trà Đặng #short #bestfriend #bff #tiktok
00:18
Wait for it 😂
00:19
ILYA BORZOV
Рет қаралды 10 МЛН
ЗНАЛИ? ТОЛЬКО ОАЭ 🤫
00:13
Сам себе сушист
Рет қаралды 4 МЛН
I Made My First Game in Godot in 3 Weeks...
26:21
Jack Sather
Рет қаралды 410 М.
How You Can Easily Make Your Code Simpler in Godot 4
6:59
Bitlytic
Рет қаралды 452 М.
How Games Make VFX (Demonstrated in Godot 4)
5:46
PlayWithFurcifer
Рет қаралды 355 М.
Seven Minutes to Decide On Godot 4 in 2024
7:36
GDQuest
Рет қаралды 178 М.
How to Make Floating Text Damage Popups in Godot 3.2
18:27
Game Development Center
Рет қаралды 18 М.
Optimizing my Game so it Runs on a Potato
19:02
Blargis
Рет қаралды 643 М.
10 AWESOME ADDONS for GODOT 4
5:42
MrElipteach
Рет қаралды 66 М.
How I added LOTS of weapons to my game!
5:18
Bardent
Рет қаралды 56 М.
Godot 4 - Tiled Dungeon Environment From Scratch
26:24
DevLogLogan
Рет қаралды 433 М.
Friends make memories together part 2  | Trà Đặng #short #bestfriend #bff #tiktok
00:18