Announcement

Collapse
No announcement yet.

c# Zombie spawner

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    @ HAL9000
    You mean that I create an endless loop,
    which then always stop with yield return WaitForSeconds()?
    Example:

    Code:
    object wait_2 = new WaitForSeconds(2);
     while (true)
     {
     yield return wait_2;
     }
    @StompyNZ
    Yes this is for a api mod.
    Thanks, I will test it and then get back to you.
    Last edited by cookyman; 04-23-2019, 11:43 AM.

    Comment


      #17
      You can stop coroutines by using "yield break" or just letting the method reach the end of the code (as long as you've yielded at some point in the method). In the example in the other post it spawns 10 entities then the routine ends

      Comment

      Working...
      X