applepiefrost Posted May 14, 2021 Share Posted May 14, 2021 I want to achieve a fairly simple task, but something goes awry. SpawnZone = ZONE:New("Spawn Zone") Bandits = SPAWN:New("Bandits") :SpawnInZone(SpawnZone, false, 2000, 4000) :SpawnScheduled(10, 0.1) I assumed this would just spawn new groups of Bandits until the end of times every +- 10 seconds, but it seems to only spawn one group. What am I missing here? I'm building a campaign! www.coconutcockpit.com Link to comment Share on other sites More sharing options...
applepiefrost Posted May 14, 2021 Author Share Posted May 14, 2021 (edited) As was pointed out to me on the MOOSE discord, both SpawnInZone and SpawnScheduled were attempting to spawn the Bandits group and that errored out. So something like this does actually work just fine SpawnZone = ZONE:New("Spawn Zone") ZoneTable = { SpawnZone } Bandits = SPAWN:New("Bandits") :InitRandomizeZones(ZoneTable) :SpawnScheduled(10, 0.1) Edited May 14, 2021 by applepiefrost I'm building a campaign! www.coconutcockpit.com Link to comment Share on other sites More sharing options...
Stix_17 Posted May 14, 2021 Share Posted May 14, 2021 (edited) SpawnZone = ZONE:New("Spawn Zone") Bandits = SPAWN:New("Bandits") :SpawnInZone(SpawnZone, false, 2000, 4000) :SpawnScheduled(10, 0.1) --create more than one trigger zone for this to work SpawnZones = { ZONE:New("Spawn Zone1"), --trigger zone 1 ZONE:New("Spawn Zone2"), --trigger zone 2 } Bandit_Group = SPAWN:New( "Bandits" ) :InitRandomizeZones( SpawnZones ) --randomizes position in trigger zones **requires more than one trigger zone to be created :InitLimit( 1, 1 ) --(# max units at once, # max groups at once) both are needed. IE a two ship fighter group spawning maximum 1 time will need a (2, 1) Bandit_Group:SpawnScheduled(10, 0.1) --performs the scheduled 10 sec+-6 sec deviation spawning Edited May 14, 2021 by Stix_17 extra line Link to comment Share on other sites More sharing options...
Recommended Posts