Hello, I have a problem I’am trying to recreate Master Yi - Alpha Strike, in unity.
The code is what I have so far, I thought it was pretty simple but I guess not, can anyone help?
In case you don’t wish to watch the video his ability strikes all enemies in an area, I need it to strike all enemies in the level.
I have it set up so that the Dashing is equal to when the player deals damage, so I need that to be active.
if (player.GetComponent<Movement>().ultProcess >= player.GetComponent<Movement>().ultActivate)
{
Time.timeScale = 0.3f;
player.GetComponent<Movement>().isUlting = true;
GameObject[] enemyPos = GameObject.FindGameObjectsWithTag("Enemy");
player.GetComponent<Movement>().dashing = true;
foreach (GameObject e in enemyPos)
{
player.transform.position = e.transform.position;
}
player.transform.position = new Vector3(0, 0, 0);
player.GetComponent<Movement>().ultProcess = 0;
player.GetComponent<Movement>().isUlting = false;
Time.timeScale = 1;
}