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)
@Snafuey2 жыл бұрын
Your tutorials are amazing. Thank you and keep up the good work!
@baylorw4 ай бұрын
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.
@dueddel2 жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
I don't see why not! Give it a try and let me know how it goes, this will probably work great
@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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@AecertGaming Thanks, didn't think of that!
@P0RANT11 ай бұрын
getting "Invalid call. Nonexistent function 'instantiate' in base 'GDScript'." cudnt find any solution on web
@AecertGaming11 ай бұрын
Are you using Godot 3?
@jasonromero61449 ай бұрын
Downloaded the project from github and when running, clicking the mouse does not show any damage popups. Broken for Godot 4.0+??
@AecertGaming9 ай бұрын
I'll take a look, idk. It might not work for the current Godot 4.0
@baylorw4 ай бұрын
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 Жыл бұрын
sad, thought there would be also a part on how to do it in 3D. struggling for months :D
@FrostFlag9 ай бұрын
seems like you skipped a bunch of steps at the beginning? great video though
@AecertGaming9 ай бұрын
such as?
@andreischapov44749 ай бұрын
@@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.