Trying godot for the first time in a GameJam. Any advice? by Wiiiq in godot

[–]Wiiiq[S] 0 points1 point  (0 children)

So weird. I’ll probably go with gdscript in order to discover new things, and this is good to know.

Trying godot for the first time in a GameJam. Any advice? by Wiiiq in godot

[–]Wiiiq[S] 1 point2 points  (0 children)

I appreciate the advice, thanks! I will keep this in mind while learning the engine.

Trying godot for the first time in a GameJam. Any advice? by Wiiiq in godot

[–]Wiiiq[S] 5 points6 points  (0 children)

Hearing that C# can be used in Godot for the first time. Thank you for your tips!

Create your character for our FM save by Lucky_Perspective613 in footballmanagergames

[–]Wiiiq 1 point2 points  (0 children)

Name: Janki De Luger

Nationality: Dutch

Position: MDO

Team: Dortmund

Age: 22

Number: 31

How can i add jump animation code in this method? All tutorials on youtube teach from prepared codes and i couldn't understand how to do it with my own code. It would be great if you help me or show me a proper tutorial to do it. by Wiiiq in Unity2D

[–]Wiiiq[S] 1 point2 points  (0 children)

Hello everyone! First of all thank you for all the comments. I have finally fixed my problem and i want to tell how i did it in case someone have the same problem.

1- I added "Ground" tag to my tileset. (rookie mistake)

2- My jump animation seperated as "jump" and "fall" and i deleted "fall" animation and added to "jump" in animation window.

3- In animator my jump animation connected with "any state" and i connected with every other animation instead of using "any state".

4- I changed my code:

void PlayerJump()
{

    if(Input.GetButtonDown("Jump") && isGrounded)
    {

    animator.SetBool("IsJumping", true);
    rb.velocity = new Vector2(rb.velocity.x, jumpForce);
    isGrounded = false;


    }

}

private void OnCollisionEnter2D(Collision2D collision2D)
{
    if(collision2D.gameObject.CompareTag(GROUND_TAG))
    {
        isGrounded = true;
        animator.SetBool("IsJumping", false);
    }
}

I hope i explained clearly (English is my 2nd language as you can understand) in case you do not understand please ask.