Is it possible to use IEnmuerator delay inside an ability script/class? Basically just trying to add a small delay to allow for other events to happen before ability starts.
So far I have struggled highlights red but would usually be able to get this to work in monobehavior.
So far I have struggled highlights red but would usually be able to get this to work in monobehavior.
Code:
using Opsive.UltimateCharacterController.Character.Abilities;
using System.Collections;// I believe should usually enable co - routines
public override void OnTriggerEnter(Collider other)
{
if (other.tag == "Jetpack")
{
StartCoroutine(delay(v: 30)); // highlights red?
}
IEnumerator delay(int v)
{
yield return new WaitForSeconds(1.0f);//
Jetpackpactive = true;
}
Last edited: