War for the Overworld

War for the Overworld

Discover and conquer new realms!
Looking for new realms to subjugate? Peruse the cavernous depths of the Workshop to find the next map upon which to sate your bloodlust or create your own and share via the in-game editor!
Learn More
SeriousToni 19 Oct, 2018 @ 1:40am
Wave spawning with different parties
Has anyone figured out how to do a wave spawning of empire units with only one looping timer but different parties for each wave? At the moment the only thing I can think of is creating 10 timers with 10 scripts for 10 parties. What I try to achieve is having one looped timer and one script that is choosing one of my 10 parties for each wave. I know I can setup a number instead of a party in the spawn party trigger, but it does not seem to relate on any of my parties.
< >
Showing 1-1 of 1 comments
I haven't tried it yet but you might be able to make something work using lists and the pick action. Make the index of the list equal to the wave, so list[n] = wave n spawn.

Pseudo:
list1 = [entity/party A, entity/party B, etc]
list2 = [] (empty; used for temp storage / variable)
trigger: on wave spawn triggers
conditions: optional
actions: pick from list1 using wave# and store (set, not add) in temp list2, spawn unit in list2), wave#+1

Note: You cannot spawn all units in a list by selecting the list as the spawning entity. MightyScript will only spawn the first entity in the list. I've reported it as a bug several months ago. Who knows if it will ever be fixed.


If that doesn't work, then use a manual trigger of some number (ie. manual trigger 100). Then make a spawning script that triggers on 100. Add in a condition that checks the wave number (ie. wave = 1). In the action, spawn the units and increase the wave. Then clone that script a bunch and change the condition # and spawn units.

Pseudo:
on trigger 100, if wave = 1, spawn A, wave+1
on trigger 100, if wave = 2, spawn B, wave+1
on trigger 100, if wave = 3, spawn C, wave+1
< >
Showing 1-1 of 1 comments
Per page: 1530 50