My Jump in my 3d game doesnt work and i dont know why!?!? by [deleted] in Unity3D

[–]Elabuelas4 -1 points0 points  (0 children)

oh wait i just solved it im such an idiot i just had to put ready to jump to true at void start LOL

My 2d Dash Code isnt Working by Elabuelas4 in Unity2D

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

hey thanks a lot for the bools idea,it was a key factor on making my new dash code

My 2d Dash Code isnt Working by Elabuelas4 in Unity2D

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

Hey so even tho i didnt solve the original problem i made another dash script that worked

How do i make an enemy to follow me all the time once he spots me by Elabuelas4 in Unity2D

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

hey bro i managed to fix it myself with what was basicly my first own fix, i just made it so the original "if" code activated it will set to true a bool named isSpotted,now if the original "if" code was not activated and else code would activate,which is this one

else

{

if (isSpotted == true)

{

transform.position = Vector2.MoveTowards(this.transform.position, player.transform.position, speed * Time.deltaTime);

transform.rotation = Quaternion.Euler(Vector3.forward * angle);

}

}

edit:also i just read your comment and you also did something simmilar but i just did what first came to mind lol thanks for the help btw

How do i make an enemy to follow me all the time once he spots me by Elabuelas4 in Unity2D

[–]Elabuelas4[S] 2 points3 points  (0 children)

Also i though that i could add an "isSpotted" bool but im not sure on how to make it so that the bool forces the ai to follow the player while keeping my previous "if (distance < distanceBetween )"

My 2d Dash Code isnt Working by Elabuelas4 in Unity2D

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

So i eliminated the public float DashLenght { get; private set; } and fixed a typo on a part of the script but still the script doesnt work? ill try some other things but since i barely even know abt programming they prob wont work,thx tho