Do you guys know how to have the text go down when the character gets hit?

ive been using gdevelop for a bit and im having a hard time having the text go down… im i just dumb? probably…

Do you mean like a health deduction? If so, add tween behaviour to the text object. In the events, when the player is hit, create the text and tween the text position to a higher Y position.

Thank you, ill try to do this when i get home.

You can update the text’s position in the scene after a hit by modifying its transform position. For example, you might decrease the Y-axis position (or move it downward) when the character is hit.

// Example in Unity C#
public Text damageText; // reference to your text UI element
public float moveDownAmount = 10f;

public void OnCharacterHit() {
// Move the text down when the character is hit
damageText.transform.position -= new Vector3(0, moveDownAmount, 0);
}

1 Like

I think you are on the wrong website, lol

1 Like

hey, you mind showing pictures of how this is done? that way i have a better grasp.

image

Play with the easings to get one you like. Check easings.net for help with that.

1 Like

ill show mine, did i do a miss put since its not working out the same way for me…

Try adding a Trigger once while true condition to the event that checks animation frame > 1. As it stands, it’ll repeatedly add a NewText object and tween it. You only want to do this once while the condition is met.

1 Like

im on the right track now, thanks!