The Map I'm playing is intended to increase by number each time the Civilian starts the level. So for the first level it would be 1 Marine, second level would be 2 Marines, third level would be 3 Marines, all the way up to 8 Marines. Then the next time the Civilian starts a level it sends out a Boss. After that, it switches to a different unit and the same process starts over again.
Well sometimes, rather than doing this:
1, 2, 3, 4, 5, 6, 7, 8...
It will do this:
1, 1, 2, 3, 4, 5 ,6 7, 8
Or this...
1, 1, 3, 4, 5, 6, 7, 8
I've also been getting Triggers where it sends out Findlay, and then it sends him out again... But I can't find a single thing wrong with the Triggers. I'm posting them here to see if anyone else out there can spot the problem. Maybe the whole process of which I'm setting up each level is incorrect or something...
Player 1 Moves Civilian to Doodad
Events
Unit - Any Unit Enters Player 1 StartLevel
Local Variables
Conditions
(Owner of (Triggering unit)) == 1
(Unit type of (Triggering unit)) == Civilian (Male)
Actions
Unit - Move (Triggering unit) instantly to Player 1 Civ Start (No Blend)
Unit - Order (Triggering unit) to ( Stop) (Replace Existing Orders)
General - Switch (Actions) depending on Switch
Cases
General - If (1)
Actions
Unit - Create 1 Marine for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Round 1: Marines" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (2)
Actions
Unit - Create 2 Marine for player 9 at Enemy Start 1 using default facing (No Options)
General - If (3)
Actions
Unit - Create 3 Marine for player 9 at Enemy Start 1 using default facing (No Options)
General - If (4)
Actions
Unit - Create 4 Marine for player 9 at Enemy Start 1 using default facing (No Options)
General - If (5)
Actions
Unit - Create 5 Marine for player 9 at Enemy Start 1 using default facing (No Options)
General - If (6)
Actions
Unit - Create 6 Marine for player 9 at Enemy Start 1 using default facing (No Options)
General - If (7)
Actions
Unit - Create 7 Marine for player 9 at Enemy Start 1 using default facing (No Options)
General - If (8)
Actions
Unit - Create 8 Marine for player 9 at Enemy Start 1 using default facing (No Options)
General - If (9)
Actions
Unit - Create 1 Tychus Findlay (Commando) for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Boss: Tychus Findlay" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (10)
Actions
Unit - Create 1 Zergling for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Round 2: Zerglings" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (11)
Actions
Unit - Create 2 Zergling for player 9 at Enemy Start 1 using default facing (No Options)
General - If (12)
Actions
Unit - Create 3 Zergling for player 9 at Enemy Start 1 using default facing (No Options)
General - If (13)
Actions
Unit - Create 4 Zergling for player 9 at Enemy Start 1 using default facing (No Options)
General - If (14)
Actions
Unit - Create 5 Zergling for player 9 at Enemy Start 1 using default facing (No Options)
General - If (15)
Actions
Unit - Create 6 Zergling for player 9 at Enemy Start 1 using default facing (No Options)
General - If (16)
Actions
Unit - Create 7 Zergling for player 9 at Enemy Start 1 using default facing (No Options)
General - If (17)
Actions
Unit - Create 8 Zergling for player 9 at Enemy Start 1 using default facing (No Options)
General - If (10)
Actions
Unit - Create 1 Ultralisk for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Boss 2: Ultralisk" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (19)
Actions
Unit - Create 1 Zealot for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Round 3: Zealots" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (20)
Actions
Unit - Create 2 Zealot for player 9 at Enemy Start 1 using default facing (No Options)
General - If (21)
Actions
Unit - Create 3 Zealot for player 9 at Enemy Start 1 using default facing (No Options)
General - If (22)
Actions
Unit - Create 4 Zealot for player 9 at Enemy Start 1 using default facing (No Options)
General - If (23)
Actions
Unit - Create 5 Zealot for player 9 at Enemy Start 1 using default facing (No Options)
General - If (24)
Actions
Unit - Create 6 Zealot for player 9 at Enemy Start 1 using default facing (No Options)
General - If (25)
Actions
Unit - Create 7 Zealot for player 9 at Enemy Start 1 using default facing (No Options)
General - If (26)
Actions
Unit - Create 8 Zealot for player 9 at Enemy Start 1 using default facing (No Options)
General - If (27)
Actions
Unit - Create 1 Immortal for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Boss: Immortal" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (28)
Actions
Unit - Create 1 Sentry for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Round 4: Sentries" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (29)
Actions
Unit - Create 2 Sentry for player 9 at Enemy Start 1 using default facing (No Options)
General - If (30)
Actions
Unit - Create 3 Sentry for player 9 at Enemy Start 1 using default facing (No Options)
General - If (31)
Actions
Unit - Create 4 Sentry for player 9 at Enemy Start 1 using default facing (No Options)
General - If (32)
Actions
Unit - Create 5 Sentry for player 9 at Enemy Start 1 using default facing (No Options)
General - If (33)
Actions
Unit - Create 6 Sentry for player 9 at Enemy Start 1 using default facing (No Options)
General - If (34)
Actions
Unit - Create 7 Sentry for player 9 at Enemy Start 1 using default facing (No Options)
General - If (35)
Actions
Unit - Create 8 Sentry for player 9 at Enemy Start 1 using default facing (No Options)
General - If (36)
Actions
Unit - Create 1 Aberration for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Boss: Aberration" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (37)
Actions
Unit - Create 1 Pygalisk for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Round 5: Pygalisks" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (38)
Actions
Unit - Create 2 Pygalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (39)
Actions
Unit - Create 3 Pygalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (40)
Actions
Unit - Create 4 Pygalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (41)
Actions
Unit - Create 5 Pygalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (42)
Actions
Unit - Create 6 Pygalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (43)
Actions
Unit - Create 7 Pygalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (44)
Actions
Unit - Create 8 Pygalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (45)
Actions
Unit - Create 1 Tosh (Unit) for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Boss: Tosh" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (46)
Actions
Unit - Create 1 High Templar for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Round 6: High Templars" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (47)
Actions
Unit - Create 1 High Templar for player 9 at Enemy Start 1 using default facing (No Options)
General - If (48)
Actions
Unit - Create 1 High Templar for player 9 at Enemy Start 1 using default facing (No Options)
General - If (49)
Actions
Unit - Create 1 High Templar for player 9 at Enemy Start 1 using default facing (No Options)
General - If (50)
Actions
Unit - Create 1 High Templar for player 9 at Enemy Start 1 using default facing (No Options)
General - If (51)
Actions
Unit - Create 1 High Templar for player 9 at Enemy Start 1 using default facing (No Options)
General - If (52)
Actions
Unit - Create 1 High Templar for player 9 at Enemy Start 1 using default facing (No Options)
General - If (53)
Actions
Unit - Create 1 High Templar for player 9 at Enemy Start 1 using default facing (No Options)
General - If (54)
Actions
Unit - Create 1 Battlecruiser for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Boss: Battlecruiser" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (55)
Actions
Unit - Create 1 Mutalisk for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Round 7: Mutalisks" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (56)
Actions
Unit - Create 2 Mutalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (57)
Actions
Unit - Create 3 Mutalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (58)
Actions
Unit - Create 4 Mutalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (59)
Actions
Unit - Create 5 Mutalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (60)
Actions
Unit - Create 6 Mutalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (61)
Actions
Unit - Create 7 Mutalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (62)
Actions
Unit - Create 8 Mutalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (63)
Actions
Unit - Create 1 Overseer for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Boss: Overseer" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
Default
Variable - Modify Switch: + 1
thats a lot of stuff to look through, Its probably possible to make that a lot simpler to look at and edit if you make function that would just create make a certain amount of units and unit type depending on what "switch" it is, instead of having doing it for each and every value of switch.
I think what might be messing it up is the wait trigger. If u send the civilian to the region before the wait is over, the trigger doesn't have enough time to increase switch by 1, so i suggest set the "Variable - Modify Switch: + 1" before the switch action. You might wanna set it to start out at 0 tho then, so that the 1st time you do it, a marine is sent.
you might also want to go over your triggers, in some places you made obvious typos, like for the ultralisk, its set to 10 instead of 18.
Replace all of your code, as posted above, with the following:
Player1MovesCiviliantoDoodadEventsUnit-AnyUnitEntersPlayer1StartLevelLocalVariablesConditions(Ownerof(Triggeringunit))==1(Unittypeof(Triggeringunit))==Civilian(Male)ActionsUnit-Move(Triggeringunit)instantlytoPlayer1CivStart(NoBlend)Unit-Order(Triggeringunit)to(Stop)(ReplaceExistingOrders)Unit-CreateCurrentWaveData[0]WaveType[CurrentWaveData[1]]forplayer9atEnemyStart1usingdefaultfacing(NoOptions)General-If(Conditions)thendo(Actions)elsedo(Actions)IfCurrentWaveData[0]==1ThenUI-DisplayWaveText[CurrentWaveData[1]]for(Playergroup(1))toDirectiveareaGeneral-Wait5.0GameTimesecondsUI-ClearAllMessagesfor(Playergroup(1))ElseGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(CurrentWaveData[1]mod2)==0ThenMath-CycleCurrentWaveData[0]from1through9General-If(Conditions)thendo(Actions)elsedo(Actions)IfCurrentWaveData[0]==1ThenMath-CycleCurrentWaveData[1]from0through13ElseElseVariable-SetCurrentWaveData[0]=1General-If(Conditions)thendo(Actions)elsedo(Actions)IfCurrentWaveData[1]!=13ThenMath-CycleCurrentWaveData[1]from0through13Else------- Your ending goes here :-)
Its not an exact duplicate of what you code did, because I didn't read much of it, but it is exactly what you were trying to achive, which should rule out errorz
Whilst better than an if then else nest, this is not efficient use of a switch.
Try this:
Create two new variables outside of the trigger (Ctrl+B)
Name:WaveTypeType:UnittypeArray:isarrayArraysize:14Initialvalue:NoGameLinkandName:CurrentWaveDataType:IntegerArray:isarrayArraysize:2Initialvalue:0AddthistoyourInitializationActions,ensuringtherearenoobstructiongconditions.Variable-SetWaveType[0]=MarineVariable-SetWaveType[1]=TychusFindlay(Commando)Variable-SetWaveType[2]=ZerglingVariable-SetWaveType[3]=UltraliskVariable-SetWaveType[4]=ZealotVariable-SetWaveType[5]=ImmortalVariable-SetWaveType[6]=SentryVariable-SetWaveType[7]=AberrationVariable-SetWaveType[8]=PygaliskVariable-SetWaveType[9]=ToshVariable-SetWaveType[10]=HighTemplarVariable-SetWaveType[11]=BattlecruiserVariable-SetWaveType[12]=MutaliskVariable-SetWaveType[13]=OverseerReplaceallofyourcode,aspostedabove,withthefollowing:Player1MovesCiviliantoDoodadEventsUnit-AnyUnitEntersPlayer1StartLevelLocalVariablesConditions(Ownerof(Triggeringunit))==1(Unittypeof(Triggeringunit))==Civilian(Male)ActionsUnit-Move(Triggeringunit)instantlytoPlayer1CivStart(NoBlend)Unit-Order(Triggeringunit)to(Stop)(ReplaceExistingOrders)Unit-CreateCurrentWaveData[0]WaveType[CurrentWaveData[1]]forplayer9atEnemyStart1usingdefaultfacing(NoOptions)General-If(Conditions)thendo(Actions)elsedo(Actions)If(CurrentWaveData[1]mod2)==0ThenMath-CycleCurrentWaveData[0]from1through9ElseVariable-SetCurrentWaveData[0]=1General-If(Conditions)thendo(Actions)elsedo(Actions)IfCurrentWaveData[1]!=13ThenMath-CycleCurrentWaveData[1]from0through13Else------- Your ending goes here :-)
to be continued
I presume that doesnt send out 1 Marine, then 1 Findlay, then 1 Zergling (Etc.), because that isn't how the level plays out. The player takes his Civilian to the Beacon, it sends 1 Marine. Takes it to the beacon again, it sends 2 Marines, it takes it to the beacon again, it sends out 3 Marines (Etc.). When the Player has killed 8 Marines, the next time he sends it to the Beacon it sends out Findlay. Then the next time he takes it to the Beacon it does the same thing it did with the Marines, just with Zerglings instead.
No it does not send out 1 Marine, then 1 Findlay, then 1 Zergling (Etc.)
The waves incriment one through nine, whilst bosses are only sent once, between waves.
You can edit the displayed text, sent units, and number of waves very easily by editing the variable deffinitions I have asked you insert into your Initialization Actions.
If you have any trouble implimenting this, post here and/or PM me.
No it does not send out 1 Marine, then 1 Findlay, then 1 Zergling (Etc.) The waves incriment one through nine, whilst bosses are only sent once, between waves. You can edit the displayed text, sent units, and number of waves very easily by editing the variable deffinitions I have asked you insert into your Initialization Actions. If you have any trouble implimenting this, post here and/or PM me.
I presume that the movement of the triggering unit prevents that to some extent.
Alright, and let's say I used those Triggers for Player 2, but modified Regions and Points accordingly, would that interfere with the Trigger you posted above?
Map Initialization
Events
Game - Map initialization
Local Variables
Conditions
Actions
Variable - Set Switch = 1
Player - Make player 9 and player 10 treat each other as Ally With Shared Vision
Player - Make player 9 and player 11 treat each other as Ally With Shared Vision
Player - Make player 10 and player 11 treat each other as Ally With Shared Vision
Camera - Pan the camera for player 1 to (Center of Player 1 Civ Start) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Pan the camera for player 2 to (Center of Player 2 Civ Start) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Pan the camera for player 3 to (Center of Player 3 Civ Start) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Pan the camera for player 4 to (Center of Player 4 Civ Start) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Pan the camera for player 5 to (Center of Player 5 Civ Start) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Pan the camera for player 6 to (Center of Player 6 Civ Start) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Pan the camera for player 7 to (Center of Player 7 Civ Start) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Pan the camera for player 8 to (Center of Player 8 Civ Start) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Unit - Create 1 Civilian (Male) for player 1 at Player 1 Civ Start using default facing (No Options)
Unit - Create 1 Civilian (Male) for player 2 at Player 2 Civ Start using default facing (No Options)
Unit - Create 1 Civilian (Male) for player 3 at Player 3 Civ Start using default facing (No Options)
Unit - Create 1 Civilian (Male) for player 4 at Player 4 Civ Start using default facing (No Options)
Unit - Create 1 Civilian (Male) for player 5 at Player 5 Civ Start using default facing (No Options)
Unit - Create 1 Civilian (Male) for player 6 at Player 6 Civ Start using default facing (No Options)
Unit - Create 1 Civilian (Male) for player 7 at Player 7 Civ Start using default facing (No Options)
Unit - Create 1 Civilian (Male) for player 8 at Player 8 Civ Start using default facing (No Options)
Variable - Set Wave Type[0] = Marine
Variable - Set Wave Type[1] = Tychus Findlay (Commando)
Variable - Set Wave Type[2] = Zergling
Variable - Set Wave Type[3] = Ultralisk
Variable - Set Wave Type[4] = Zealot
Variable - Set Wave Type[5] = Immortal
Variable - Set Wave Type[6] = Sentry
Variable - Set Wave Type[7] = Aberration
Variable - Set Wave Type[8] = Pygalisk
Variable - Set Wave Type[9] = Tosh (Unit)
Variable - Set Wave Type[10] = High Templar
Variable - Set Wave Type[11] = Battlecruiser
Variable - Set Wave Type[12] = Mutalisk
Variable - Set Wave Type[13] = Overseer
Global Variables are set up as per what you wrote... And here's the Trigger you asked me to replace:
Player 1 Moves Civilian to Doodad
Events
Unit - Any Unit Enters Player 1 StartLevel
Local Variables
Conditions
(Owner of (Triggering unit)) == 1
(Unit type of (Triggering unit)) == Civilian (Male)
Actions
Unit - Move (Triggering unit) instantly to Player 1 Civ Start (No Blend)
Unit - Order (Triggering unit) to ( Stop) (Replace Existing Orders)
Unit - Create Current Wave Data[0] Wave Type[Current Wave Data[1]] for player 9 at Enemy Start 1 using default facing (No Options)
General - If (Conditions) then do (Actions) else do (Actions)
If
Current Wave Data[(1 mod 2)] == 0
Then
Math - Cycle Current Wave Data[0] from 1 through 9
Else
Variable - Set Current Wave Data[0] = 1
General - If (Conditions) then do (Actions) else do (Actions)
If
Current Wave Data[1] != 13
Then
Math - Cycle Current Wave Data[1] from 0 through 13
Else
Game - End game in Victory for player 1 (Show dialogs, Show score screen)
Right, but the trouble I'm having at the moment is that I followed the Triggers above and now no units are spawning when I start the level, so I posted what I did in the Forums here to see if anyone could figure out where I messed up..
OK so you may have noticed that my trigger took a ggood half our to write, as I posted it in several sections.
Some of the updates overwrote the origional stuff, particularly new variables.
If you send me the map Ill sort this out, otherwise check that things are as per the post thats displayed up there now.
Edit, saw where I messed up, add one more line to initialization:
if you modify that divisor there, you can change the number of waves before each boss!
So if its two (current), you get one wave, one boss wave.
If its three, two waves, one boss wave.
Four, three waves to one, and so on.
If you do that you will need to increase the cycle from 0 to 13 functions, and add the wave units into the wave type array, extending it as is apropriate.
Unit - Any Unit Enters Player 1 StartLevel
Local Variables
Conditions
(Owner of (Triggering unit)) == 1
(Unit type of (Triggering unit)) == Civilian (Male)
Actions
Unit - Move (Triggering unit) instantly to Player 1 Civ Start (No Blend)
Unit - Order (Triggering unit) to ( Stop) (Replace Existing Orders)
Unit - Create Current Wave Data[0] Wave Type[Current Wave Data[1]] for player 9 at Enemy Start 1 using default facing (No Options)
General - If (Conditions) then do (Actions) else do (Actions)
If
(Current Wave Data[1] mod 2) == 0
Then
Math - Cycle Current Wave Data[0] from 1 through 9
Else
Variable - Set Current Wave Data[0] = 1
General - If (Conditions) then do (Actions) else do (Actions)
If
Current Wave Data[1] != 13
Then
Math - Cycle Current Wave Data[1] from 0 through 13
Else
Game - End game in Victory for player 1 (Show dialogs, Show score screen)
The Map I'm playing is intended to increase by number each time the Civilian starts the level. So for the first level it would be 1 Marine, second level would be 2 Marines, third level would be 3 Marines, all the way up to 8 Marines. Then the next time the Civilian starts a level it sends out a Boss. After that, it switches to a different unit and the same process starts over again.
Well sometimes, rather than doing this:
1, 2, 3, 4, 5, 6, 7, 8...
It will do this:
1, 1, 2, 3, 4, 5 ,6 7, 8
Or this...
1, 1, 3, 4, 5, 6, 7, 8
I've also been getting Triggers where it sends out Findlay, and then it sends him out again... But I can't find a single thing wrong with the Triggers. I'm posting them here to see if anyone else out there can spot the problem. Maybe the whole process of which I'm setting up each level is incorrect or something...
Player 1 Moves Civilian to Doodad
Events
Unit - Any Unit Enters Player 1 StartLevel
Local Variables
Conditions
(Owner of (Triggering unit)) == 1
(Unit type of (Triggering unit)) == Civilian (Male)
Actions
Unit - Move (Triggering unit) instantly to Player 1 Civ Start (No Blend)
Unit - Order (Triggering unit) to ( Stop) (Replace Existing Orders)
General - Switch (Actions) depending on Switch
Cases
General - If (1)
Actions
Unit - Create 1 Marine for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Round 1: Marines" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (2)
Actions
Unit - Create 2 Marine for player 9 at Enemy Start 1 using default facing (No Options)
General - If (3)
Actions
Unit - Create 3 Marine for player 9 at Enemy Start 1 using default facing (No Options)
General - If (4)
Actions
Unit - Create 4 Marine for player 9 at Enemy Start 1 using default facing (No Options)
General - If (5)
Actions
Unit - Create 5 Marine for player 9 at Enemy Start 1 using default facing (No Options)
General - If (6)
Actions
Unit - Create 6 Marine for player 9 at Enemy Start 1 using default facing (No Options)
General - If (7)
Actions
Unit - Create 7 Marine for player 9 at Enemy Start 1 using default facing (No Options)
General - If (8)
Actions
Unit - Create 8 Marine for player 9 at Enemy Start 1 using default facing (No Options)
General - If (9)
Actions
Unit - Create 1 Tychus Findlay (Commando) for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Boss: Tychus Findlay" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (10)
Actions
Unit - Create 1 Zergling for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Round 2: Zerglings" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (11)
Actions
Unit - Create 2 Zergling for player 9 at Enemy Start 1 using default facing (No Options)
General - If (12)
Actions
Unit - Create 3 Zergling for player 9 at Enemy Start 1 using default facing (No Options)
General - If (13)
Actions
Unit - Create 4 Zergling for player 9 at Enemy Start 1 using default facing (No Options)
General - If (14)
Actions
Unit - Create 5 Zergling for player 9 at Enemy Start 1 using default facing (No Options)
General - If (15)
Actions
Unit - Create 6 Zergling for player 9 at Enemy Start 1 using default facing (No Options)
General - If (16)
Actions
Unit - Create 7 Zergling for player 9 at Enemy Start 1 using default facing (No Options)
General - If (17)
Actions
Unit - Create 8 Zergling for player 9 at Enemy Start 1 using default facing (No Options)
General - If (10)
Actions
Unit - Create 1 Ultralisk for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Boss 2: Ultralisk" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (19)
Actions
Unit - Create 1 Zealot for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Round 3: Zealots" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (20)
Actions
Unit - Create 2 Zealot for player 9 at Enemy Start 1 using default facing (No Options)
General - If (21)
Actions
Unit - Create 3 Zealot for player 9 at Enemy Start 1 using default facing (No Options)
General - If (22)
Actions
Unit - Create 4 Zealot for player 9 at Enemy Start 1 using default facing (No Options)
General - If (23)
Actions
Unit - Create 5 Zealot for player 9 at Enemy Start 1 using default facing (No Options)
General - If (24)
Actions
Unit - Create 6 Zealot for player 9 at Enemy Start 1 using default facing (No Options)
General - If (25)
Actions
Unit - Create 7 Zealot for player 9 at Enemy Start 1 using default facing (No Options)
General - If (26)
Actions
Unit - Create 8 Zealot for player 9 at Enemy Start 1 using default facing (No Options)
General - If (27)
Actions
Unit - Create 1 Immortal for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Boss: Immortal" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (28)
Actions
Unit - Create 1 Sentry for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Round 4: Sentries" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (29)
Actions
Unit - Create 2 Sentry for player 9 at Enemy Start 1 using default facing (No Options)
General - If (30)
Actions
Unit - Create 3 Sentry for player 9 at Enemy Start 1 using default facing (No Options)
General - If (31)
Actions
Unit - Create 4 Sentry for player 9 at Enemy Start 1 using default facing (No Options)
General - If (32)
Actions
Unit - Create 5 Sentry for player 9 at Enemy Start 1 using default facing (No Options)
General - If (33)
Actions
Unit - Create 6 Sentry for player 9 at Enemy Start 1 using default facing (No Options)
General - If (34)
Actions
Unit - Create 7 Sentry for player 9 at Enemy Start 1 using default facing (No Options)
General - If (35)
Actions
Unit - Create 8 Sentry for player 9 at Enemy Start 1 using default facing (No Options)
General - If (36)
Actions
Unit - Create 1 Aberration for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Boss: Aberration" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (37)
Actions
Unit - Create 1 Pygalisk for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Round 5: Pygalisks" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (38)
Actions
Unit - Create 2 Pygalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (39)
Actions
Unit - Create 3 Pygalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (40)
Actions
Unit - Create 4 Pygalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (41)
Actions
Unit - Create 5 Pygalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (42)
Actions
Unit - Create 6 Pygalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (43)
Actions
Unit - Create 7 Pygalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (44)
Actions
Unit - Create 8 Pygalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (45)
Actions
Unit - Create 1 Tosh (Unit) for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Boss: Tosh" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (46)
Actions
Unit - Create 1 High Templar for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Round 6: High Templars" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (47)
Actions
Unit - Create 1 High Templar for player 9 at Enemy Start 1 using default facing (No Options)
General - If (48)
Actions
Unit - Create 1 High Templar for player 9 at Enemy Start 1 using default facing (No Options)
General - If (49)
Actions
Unit - Create 1 High Templar for player 9 at Enemy Start 1 using default facing (No Options)
General - If (50)
Actions
Unit - Create 1 High Templar for player 9 at Enemy Start 1 using default facing (No Options)
General - If (51)
Actions
Unit - Create 1 High Templar for player 9 at Enemy Start 1 using default facing (No Options)
General - If (52)
Actions
Unit - Create 1 High Templar for player 9 at Enemy Start 1 using default facing (No Options)
General - If (53)
Actions
Unit - Create 1 High Templar for player 9 at Enemy Start 1 using default facing (No Options)
General - If (54)
Actions
Unit - Create 1 Battlecruiser for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Boss: Battlecruiser" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (55)
Actions
Unit - Create 1 Mutalisk for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Round 7: Mutalisks" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
General - If (56)
Actions
Unit - Create 2 Mutalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (57)
Actions
Unit - Create 3 Mutalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (58)
Actions
Unit - Create 4 Mutalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (59)
Actions
Unit - Create 5 Mutalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (60)
Actions
Unit - Create 6 Mutalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (61)
Actions
Unit - Create 7 Mutalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (62)
Actions
Unit - Create 8 Mutalisk for player 9 at Enemy Start 1 using default facing (No Options)
General - If (63)
Actions
Unit - Create 1 Overseer for player 9 at Enemy Start 1 using default facing (No Options)
UI - Display "Boss: Overseer" for (Player group(1)) to Directive area
General - Wait 5.0 Game Time seconds
UI - Clear All Messages for (Player group(1))
Default
Variable - Modify Switch: + 1
(And yes, I realize that the High Templars are being sent out one at a time, I haven't fixed that yet because I'm still testing out the early levels.
@Mesden:
thats a lot of stuff to look through, Its probably possible to make that a lot simpler to look at and edit if you make function that would just create make a certain amount of units and unit type depending on what "switch" it is, instead of having doing it for each and every value of switch.
I think what might be messing it up is the wait trigger. If u send the civilian to the region before the wait is over, the trigger doesn't have enough time to increase switch by 1, so i suggest set the "Variable - Modify Switch: + 1" before the switch action. You might wanna set it to start out at 0 tho then, so that the 1st time you do it, a marine is sent.
you might also want to go over your triggers, in some places you made obvious typos, like for the ultralisk, its set to 10 instead of 18.
Whilst better than an if then else nest, this is not efficient use of a switch.
Try this:
Create three new variables outside of the trigger (Ctrl+B)
and
Add this to your Initialization Actions, ensuring there are no obstructiong conditions.
Replace all of your code, as posted above, with the following:
Its not an exact duplicate of what you code did, because I didn't read much of it, but it is exactly what you were trying to achive, which should rule out errorz
Your current trigger looks like its possible to have your civilian que up two waves at once.
I presume that doesnt send out 1 Marine, then 1 Findlay, then 1 Zergling (Etc.), because that isn't how the level plays out. The player takes his Civilian to the Beacon, it sends 1 Marine. Takes it to the beacon again, it sends 2 Marines, it takes it to the beacon again, it sends out 3 Marines (Etc.). When the Player has killed 8 Marines, the next time he sends it to the Beacon it sends out Findlay. Then the next time he takes it to the Beacon it does the same thing it did with the Marines, just with Zerglings instead.
No it does not send out 1 Marine, then 1 Findlay, then 1 Zergling (Etc.) The waves incriment one through nine, whilst bosses are only sent once, between waves. You can edit the displayed text, sent units, and number of waves very easily by editing the variable deffinitions I have asked you insert into your Initialization Actions. If you have any trouble implimenting this, post here and/or PM me.
@SouLCarveRR: Go
I presume that the movement of the triggering unit prevents that to some extent.
Alright, and let's say I used those Triggers for Player 2, but modified Regions and Points accordingly, would that interfere with the Trigger you posted above?
@Mesden: Go
How do you get it to say If Current Wave Data[1] mod 2 == 0, what is that "mod"?
EDIT: Nevermind, it was "Modular" I was looking for
Hmm... Nothing spawned... I'll post what I did:
Here's the Map Initialization:
Map Initialization
Events
Game - Map initialization
Local Variables
Conditions
Actions
Variable - Set Switch = 1
Player - Make player 9 and player 10 treat each other as Ally With Shared Vision
Player - Make player 9 and player 11 treat each other as Ally With Shared Vision
Player - Make player 10 and player 11 treat each other as Ally With Shared Vision
Camera - Pan the camera for player 1 to (Center of Player 1 Civ Start) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Pan the camera for player 2 to (Center of Player 2 Civ Start) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Pan the camera for player 3 to (Center of Player 3 Civ Start) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Pan the camera for player 4 to (Center of Player 4 Civ Start) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Pan the camera for player 5 to (Center of Player 5 Civ Start) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Pan the camera for player 6 to (Center of Player 6 Civ Start) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Pan the camera for player 7 to (Center of Player 7 Civ Start) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Pan the camera for player 8 to (Center of Player 8 Civ Start) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Unit - Create 1 Civilian (Male) for player 1 at Player 1 Civ Start using default facing (No Options)
Unit - Create 1 Civilian (Male) for player 2 at Player 2 Civ Start using default facing (No Options)
Unit - Create 1 Civilian (Male) for player 3 at Player 3 Civ Start using default facing (No Options)
Unit - Create 1 Civilian (Male) for player 4 at Player 4 Civ Start using default facing (No Options)
Unit - Create 1 Civilian (Male) for player 5 at Player 5 Civ Start using default facing (No Options)
Unit - Create 1 Civilian (Male) for player 6 at Player 6 Civ Start using default facing (No Options)
Unit - Create 1 Civilian (Male) for player 7 at Player 7 Civ Start using default facing (No Options)
Unit - Create 1 Civilian (Male) for player 8 at Player 8 Civ Start using default facing (No Options)
Variable - Set Wave Type[0] = Marine
Variable - Set Wave Type[1] = Tychus Findlay (Commando)
Variable - Set Wave Type[2] = Zergling
Variable - Set Wave Type[3] = Ultralisk
Variable - Set Wave Type[4] = Zealot
Variable - Set Wave Type[5] = Immortal
Variable - Set Wave Type[6] = Sentry
Variable - Set Wave Type[7] = Aberration
Variable - Set Wave Type[8] = Pygalisk
Variable - Set Wave Type[9] = Tosh (Unit)
Variable - Set Wave Type[10] = High Templar
Variable - Set Wave Type[11] = Battlecruiser
Variable - Set Wave Type[12] = Mutalisk
Variable - Set Wave Type[13] = Overseer
Global Variables are set up as per what you wrote... And here's the Trigger you asked me to replace:
Player 1 Moves Civilian to Doodad
Events
Unit - Any Unit Enters Player 1 StartLevel
Local Variables
Conditions
(Owner of (Triggering unit)) == 1
(Unit type of (Triggering unit)) == Civilian (Male)
Actions
Unit - Move (Triggering unit) instantly to Player 1 Civ Start (No Blend)
Unit - Order (Triggering unit) to ( Stop) (Replace Existing Orders)
Unit - Create Current Wave Data[0] Wave Type[Current Wave Data[1]] for player 9 at Enemy Start 1 using default facing (No Options)
General - If (Conditions) then do (Actions) else do (Actions)
If
Current Wave Data[(1 mod 2)] == 0
Then
Math - Cycle Current Wave Data[0] from 1 through 9
Else
Variable - Set Current Wave Data[0] = 1
General - If (Conditions) then do (Actions) else do (Actions)
If
Current Wave Data[1] != 13
Then
Math - Cycle Current Wave Data[1] from 0 through 13
Else
Game - End game in Victory for player 1 (Show dialogs, Show score screen)
@Mesden:
Anyone..?
A good way to make sure you don't get double of a trigger, make a condition: If sentWave = false ... send wave and set sentWave = true
@Eaglesight:
Right, but the trouble I'm having at the moment is that I followed the Triggers above and now no units are spawning when I start the level, so I posted what I did in the Forums here to see if anyone could figure out where I messed up..
OK so you may have noticed that my trigger took a ggood half our to write, as I posted it in several sections. Some of the updates overwrote the origional stuff, particularly new variables. If you send me the map Ill sort this out, otherwise check that things are as per the post thats displayed up there now.
Edit, saw where I messed up, add one more line to initialization:
@GeEom:
Alright, now the units are spawning, but here's what it's doing now:
1 Marine, 2 Marine, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9 (Repeat)
No Bosses except for the Team Challenge and no Round 2.
However, I've attached the Map in case you want to look at the Triggers I didn't post
this
should be this
Also added the missing cycle for the even number waves,
so it should all add up like this:
Remember that you still need to add the wave text functions if you want the player to have these waves and bosses anounced!
Quote from GeEom:
this
Current Wave Data[(1 mod 2)] == 0
should be this
(Current Wave Data[1] mod 2) == 0
---
Yeah can you step me through getting that bracket on the 1? I couldn't figure that out.
@Mesden: Go
I want to bed, bent my sleep schedual out by about 5 hours
anyhow,
if you modify that divisor there, you can change the number of waves before each boss!
So if its two (current), you get one wave, one boss wave.
If its three, two waves, one boss wave.
Four, three waves to one, and so on.
If you do that you will need to increase the cycle from 0 to 13 functions, and add the wave units into the wave type array, extending it as is apropriate.
@GeEom:
Changed it to Modulo (Integer), it looks exactly like what you wrote now, but it's still doing this:
1 Marine, 2 Marines, 3 Marines, 4 Marines, 5 Marines, 6 Marines, 7 Marines, 8 Marines, 9 Marines, (Repeat)
Unit - Any Unit Enters Player 1 StartLevel
Local Variables
Conditions
(Owner of (Triggering unit)) == 1
(Unit type of (Triggering unit)) == Civilian (Male)
Actions
Unit - Move (Triggering unit) instantly to Player 1 Civ Start (No Blend)
Unit - Order (Triggering unit) to ( Stop) (Replace Existing Orders)
Unit - Create Current Wave Data[0] Wave Type[Current Wave Data[1]] for player 9 at Enemy Start 1 using default facing (No Options)
General - If (Conditions) then do (Actions) else do (Actions)
If
(Current Wave Data[1] mod 2) == 0
Then
Math - Cycle Current Wave Data[0] from 1 through 9
Else
Variable - Set Current Wave Data[0] = 1
General - If (Conditions) then do (Actions) else do (Actions)
If
Current Wave Data[1] != 13
Then
Math - Cycle Current Wave Data[1] from 0 through 13
Else
Game - End game in Victory for player 1 (Show dialogs, Show score screen)
@Mesden: Go
Go back to the origional post, I have edited it, there are aditional functions there now! Add all that, then return with good news :)