Random monster spawn help

  • I would like for a weak monster to spawn from a cave every 5 seconds, but I'd also like a strong monster to spawn every 30 seconds. It's important that the strong monster spawns in place of the weak monster instead of with it. Is this possible?

  • That is possible and not too hard.

    Make a global variable.

    Every 5 seconds add 1 to global variable

    If global variable is smaller then 6 > Spawn weak monster

    If global variable is equal to 6 > Spawn strong monster

    > Set global variable to 0

    Good luck ^^

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That is possible and not too hard.

    Make a global variable.

    Every 5 seconds add 1 to global variable

    If global variable is smaller then 6 > Spawn weak monster

    If global variable is equal to 6 > Spawn strong monster

    > Set global variable to 0

    Good luck ^^

    Thanks! I will try that.

  • I did this recently with an special enemy that is spawned in an specific interval of time (3~8 seconds).

    Set Enemy to floor(random(3,8))

    "Enemy" is a global variable that is used in a later event that interrupt the commom enemies spawn.

    System > Set group "commom enemies" deactivated

    Generator > Spawn Special Enemy on layer 0

    System > Wait 1 second

    System > Set group "commom enemies" activated

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)