aliens

Author Topic: making ufo waves to spawn at the same time?  (Read 4870 times)

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
making ufo waves to spawn at the same time?
« on: December 09, 2016, 09:42:10 pm »
alienMissions:
  - type: STR_ALIEN_RESEARCH
    points: 0
    raceWeights:
      0:
        ...
    waves:
      - ufo: STR_SMALL_SCOUT
        count: 1
        trajectory: P0
        timer: 9000
      - ufo: STR_MEDIUM_SCOUT
        count: 1
        trajectory: P2
        timer: 7800
      - ufo: STR_LARGE_SCOUT
        count: 2
        trajectory: P4

is it possible to make all the UFOs spawn at the same time (almost)?
setting the timers to 0 won't do it because the timer AFAIK starts counting at the end of the previous waves.
maybe a negative timer?


the other options would be to use missionScript to have concurrent missions (this is what i'm doing at the moment) but maybe there is a more elegant/functional method.

thanks.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: making ufo waves to spawn at the same time?
« Reply #1 on: December 09, 2016, 09:56:21 pm »
Code: [Select]
  - type: STR_ALIEN_BASE
    waves:
      - ufo: STR_SMALL_SCOUT
        count: 1
        trajectory: P1
        timer: 13500
      - ufo: STR_MEDIUM_SCOUT
        count: 1
        trajectory: P5
        timer: 15000
      - ufo: STR_LARGE_SCOUT
        count: 1
        trajectory: P5
        timer: 60
      - ufo: STR_SUPPLY_SHIP
        count: 2
        trajectory: P5
        timer: 60
      - ufo: STR_BATTLESHIP
        count: 1
        trajectory: P6
        timer: 60

The Large Scout, Supply Ship and Battleship are set to spawn almost simultaneously, at intervals of 30-150 minutes.

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: making ufo waves to spawn at the same time?
« Reply #2 on: December 09, 2016, 10:15:33 pm »
Code: [Select]
  - type: STR_ALIEN_BASE
    waves:
      - ufo: STR_SMALL_SCOUT
        count: 1
        trajectory: P1
        timer: 13500
      - ufo: STR_MEDIUM_SCOUT
        count: 1
        trajectory: P5
        timer: 15000
      - ufo: STR_LARGE_SCOUT
        count: 1
        trajectory: P5
        timer: 60
      - ufo: STR_SUPPLY_SHIP
        count: 2
        trajectory: P5
        timer: 60
      - ufo: STR_BATTLESHIP
        count: 1
        trajectory: P6
        timer: 60

The Large Scout, Supply Ship and Battleship are set to spawn almost simultaneously, at intervals of 30-150 minutes.
but will they fly together?

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: making ufo waves to spawn at the same time?
« Reply #3 on: December 09, 2016, 11:17:59 pm »
but will they fly together?

In a formation?

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: making ufo waves to spawn at the same time?
« Reply #4 on: December 09, 2016, 11:22:27 pm »
In a formation?
that's afaik impossible; what i mean is: at the same time

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: making ufo waves to spawn at the same time?
« Reply #5 on: December 09, 2016, 11:53:49 pm »
that's afaik impossible; what i mean is: at the same time

It would be possible to have a group of ufos spawn at the same location and create specific flight paths so that they would all flew together in a formation across the globe. Although this is likely not practical for use.

As for spawning at the same time, if 0 doesn't work then the alternative would be to use 1 minute for the timer.

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: making ufo waves to spawn at the same time?
« Reply #6 on: December 10, 2016, 10:03:53 am »
It would be possible to have a group of ufos spawn at the same location and create specific flight paths so that they would all flew together in a formation across the globe. Although this is likely not practical for use.

As for spawning at the same time, if 0 doesn't work then the alternative would be to use 1 minute for the timer.
by Ruleset Reference, 0 should be the default value.
My doubt is about how it works, here's what it says:

timer    How long after the previous wave should this wave arrive? (in minutes - actual value used is spawnTimer/4 or 3*spawnTimer/4)

does the timer starts counting after the previous UFO is spawned, or after the prev UFO is de-spawned? if the latter, they will not fly at the same time no matter what value you assign to the timer.

Offline Brian

  • Sergeant
  • **
  • Posts: 18
    • View Profile
Re: making ufo waves to spawn at the same time?
« Reply #7 on: December 10, 2016, 07:29:00 pm »
It's after the previous UFO is spawned.  Like Hobbes said, this is how the vanilla infiltration and alien base missions send several UFOs at the same time.