Hi,
Below are a set of triggers which essentially do the following:
-----------------------------------------------------------------
1. Complete a death counter timer
2. When timer is complete, randomize a Switch 3 times in a row
3. Result is a random number (stored as DC) from 0-7
4. Choose a random spawn from the following: 3/8 Hydra, 3/8 Dragoon, and 2/8 Ultralisk
------------------------------------------------------------------
Now I've done this algorithm hundreds of times to randomize stuff on a timed basis. In fact I've got several systems using this structure in the same map, and they work flawlessly. So as you imagine, I've copied it over a hundred times and done my manual macros. But this time, the third option for Ultralisk NEVER comes up. And I mean NEVER. It's a 25% chance, and sure it will choose Dragoon/Hydra 75% of the time, but even so, the damn Ultralisk has to spawn at some point. In other systems (same exact structure), I've got events with probabilities as low as 3%, yet I see them come up every game. This Ultralisk never comes. Which means the conditions that spawn it are not returning as true. Here's the triggers for context.
Triggers
Trigger("Player 8"){
Conditions:
Deaths("Current Player", "Artanis (Scout)", At most, 0);
Actions:
Set Deaths("Current Player", "Artanis (Scout)", Set To, 4);
Run AI Script At Location("JYDg", "Hell");
Preserve Trigger();
Comment("Boss Spawn Timer\r\nDC: Artanis (Scout)");
}
//-----------------------------------------------------------------//
Trigger("Player 8"){
Conditions:
Deaths("Current Player", "Artanis (Scout)", At least, 2);
Actions:
Set Deaths("Current Player", "Artanis (Scout)", Subtract, 1);
Preserve Trigger();
Comment("Boss Spawn Timer Subtract");
}
//-----------------------------------------------------------------//
Trigger("Player 8"){
Conditions:
Deaths("Current Player", "Artanis (Scout)", Exactly, 1);
Actions:
Set Switch("Switch96", randomize);
Set Deaths("Current Player", "Alexei Stukov (Ghost)", Set To, 0);
Preserve Trigger();
Comment("Boss Spawn Switch Randomize Init\r\nSwitch 96\r\nDC: Alexei Stukov (Ghost)");
}
//-----------------------------------------------------------------//
Trigger("Player 8"){
Conditions:
Deaths("Current Player", "Artanis (Scout)", Exactly, 1);
Switch("Switch96", set);
Actions:
Set Deaths("Current Player", "Alexei Stukov (Ghost)", Add, 1);
Preserve Trigger();
Comment("Boss Spawn Randomize +1");
}
//-----------------------------------------------------------------//
Trigger("Player 8"){
Conditions:
Deaths("Current Player", "Artanis (Scout)", Exactly, 1);
Actions:
Set Switch("Switch96", randomize);
Set Deaths("Current Player", "Alexei Stukov (Ghost)", Set To, 0);
Preserve Trigger();
Comment("Boss Spawn Switch Randomize");
}
//-----------------------------------------------------------------//
Trigger("Player 8"){
Conditions:
Deaths("Current Player", "Artanis (Scout)", Exactly, 1);
Switch("Switch96", set);
Actions:
Set Deaths("Current Player", "Alexei Stukov (Ghost)", Add, 2);
Preserve Trigger();
Comment("Boss Spawn Randomize +2");
}
//-----------------------------------------------------------------//
Trigger("Player 8"){
Conditions:
Deaths("Current Player", "Artanis (Scout)", Exactly, 1);
Actions:
Set Switch("Switch96", randomize);
Set Deaths("Current Player", "Alexei Stukov (Ghost)", Set To, 0);
Preserve Trigger();
Comment("Boss Spawn Switch Randomize");
}
//-----------------------------------------------------------------//
Trigger("Player 8"){
Conditions:
Deaths("Current Player", "Artanis (Scout)", Exactly, 1);
Switch("Switch96", set);
Actions:
Set Deaths("Current Player", "Alexei Stukov (Ghost)", Add, 4);
Preserve Trigger();
Comment("Boss Spawn Randomize +4");
}
//-----------------------------------------------------------------//
Trigger("Player 8"){
Conditions:
Deaths("Current Player", "Alexei Stukov (Ghost)", At least, 0);
Deaths("Current Player", "Alexei Stukov (Ghost)", At most, 2);
Deaths("Current Player", "Artanis (Scout)", Exactly, 1);
Deaths("Current Player", "Zerg Hatchery", At most, 0);
Actions:
Create Unit("Current Player", "Hunter Killer (Hydralisk)", 1, "BossSpawn");
Give Units to Player("Current Player", "Player 10", "Hunter Killer (Hydralisk)", All, "BossSpawn");
Set Deaths("Current Player", "Artanis (Scout)", Set To, 0);
Preserve Trigger();
Comment("Boss Spawn Level 1 - Hydra");
}
//-----------------------------------------------------------------//
Trigger("Player 8"){
Conditions:
Deaths("Current Player", "Alexei Stukov (Ghost)", At least, 3);
Deaths("Current Player", "Alexei Stukov (Ghost)", At most, 5);
Deaths("Current Player", "Artanis (Scout)", Exactly, 1);
Command("Current Player", "Protoss Dragoon", At most, 0);
Actions:
Create Unit("Current Player", "Protoss Dragoon", 1, "BossSpawn");
Give Units to Player("Current Player", "Player 10", "Protoss Dragoon", All, "BossSpawn");
Set Deaths("Current Player", "Artanis (Scout)", Set To, 0);
Preserve Trigger();
Comment("Boss Spawn Level 1 - Dragoon");
}
//-----------------------------------------------------------------//
Trigger("Player 8"){
Conditions:
Deaths("Current Player", "Alexei Stukov (Ghost)", At least, 6);
Deaths("Current Player", "Alexei Stukov (Ghost)", At most, 7);
Deaths("Current Player", "Artanis (Scout)", Exactly, 1);
Command("Current Player", "Zerg Ultralisk", At most, 0);
Actions:
Create Unit("Current Player", "Zerg Ultralisk", 1, "BossSpawn");
Give Units to Player("Current Player", "Player 10", "Zerg Ultralisk", All, "BossSpawn");
Set Deaths("Current Player", "Artanis (Scout)", Set To, 0);
Preserve Trigger();
Comment("Boss Spawn Level 1 - Ultralisk");
}
//-----------------------------------------------------------------//
Trigger("Player 8"){
Conditions:
Deaths("Current Player", "Alexei Stukov (Ghost)", At least, 0);
Deaths("Current Player", "Artanis (Scout)", Exactly, 1);
Command("Current Player", "Zerg Ultralisk", At most, 0);
Actions:
Set Deaths("Current Player", "Artanis (Scout)", Set To, 0);
Preserve Trigger();
Comment("Boss Spawn Otherwise");
}
//-----------------------------------------------------------------//
So, if the Ultralisk is never spawning, it logically means one of the conditions must be false, otherwise it surely will spawn at some point that isn't at the end of the universe. My 3% events usually happen within at most ~5 minutes of each other. A 25% event should happen much more frequently...
Conditions I am certain are true:
1. Deaths("Current Player", "Artanis (Scout)", Exactly, 1);
The other triggers requiring this are firing, and nowhere do I ever modify this DC except in the triggers given.
2. Command("Current Player", "Zerg Ultralisk", At most, 0);
There's no preplaced ultras on the map, and I never have P8 spawn one except through this way.
I think these conditions are the culprit, but I have no real way of proving it, or knowing why.
3. Deaths("Current Player", "Alexei Stukov (Ghost)", At least, 6);
Deaths("Current Player", "Alexei Stukov (Ghost)", At most, 7);
If I make it a range of 0-7, the Ultra sure does damn well spawn. But I checked my switch randomization statements, and surely it must generate a number from 0-7.
I need a fresh pair of eyes for this incredibly simple oversight that I can't yet see. Thanks.
None.