Greetings. I am not sure whether this or a trigger forum is a better place to post this. I've encountered an extremely weird bug I have no idea how to fix.
So, a trigger procs whenever I cast an ability (Multi Shot).
The trigger itself is kinda basic - it makes 5 dummies and forces each to cast an "arrow spell" offset by angle, so it makes a cone of arrows.
It works... 99% of the time. Absolutely as intended, by spawning 5 dummies and letting each shoot an arrow.
1% of the time, IF you are in a very specific condition, it does not.
That's when it gets weird.
When you enter a specific spot in my map, it might spawn only one dummy, get (and show) absolutely incorrect coords for casts, it might spawn 2 or 3 instead. It might spawn all 5 if you are a bit off that spot, and shoot the incorrect place.
I honestly have no idea what causes this trouble. That location has literally nothing to do with the game's specifics. Well... map was a 32x32 at some point, but is that even possible to make it cause issues? I was not able to replicate the bug at, say, bottom of the map.
Here is the trigger. I've tweaked it to make it easier to debug.
I am attaching the map in case you want to see it yourself. Pick an archer, and here is the screenie (just a bit up from the start) on what your "multi shot" cast has to be like to make the bug happen.
That's it, hoping for someone grateful enough to save me!
There is also another gamebreaking complicated bug, and it is also location-related (but... different location, duh), but much harder to reproduce and I think is connected to this one.
So, a trigger procs whenever I cast an ability (Multi Shot).
The trigger itself is kinda basic - it makes 5 dummies and forces each to cast an "arrow spell" offset by angle, so it makes a cone of arrows.
It works... 99% of the time. Absolutely as intended, by spawning 5 dummies and letting each shoot an arrow.
1% of the time, IF you are in a very specific condition, it does not.
That's when it gets weird.
When you enter a specific spot in my map, it might spawn only one dummy, get (and show) absolutely incorrect coords for casts, it might spawn 2 or 3 instead. It might spawn all 5 if you are a bit off that spot, and shoot the incorrect place.
I honestly have no idea what causes this trouble. That location has literally nothing to do with the game's specifics. Well... map was a 32x32 at some point, but is that even possible to make it cause issues? I was not able to replicate the bug at, say, bottom of the map.
Here is the trigger. I've tweaked it to make it easier to debug.
-
ArcherMultiShot
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Multi Shot
-
-
Actions
-
Set TargetMultishot = ((Position of (Casting unit)) offset by 800.00 towards (Facing of (Casting unit)) degrees)
-
Unit - Create 1 dummy - multishot for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
-
Unit - Set level of ArrowMS for (Last created unit) to (Level of Multi Shot for (Casting unit))
-
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
Unit - Order (Last created unit) to Human Archmage - Blizzard TargetMultishot
-
Game - Display to (All players) the text: MS coord 1
-
Game - Display to (All players) the text: ((String((X of TargetMultishot))) + ( + (String((Y of TargetMultishot)))))
-
Set TargetMultishot = ((Position of (Casting unit)) offset by 800.00 towards ((Facing of (Casting unit)) + 10.00) degrees)
-
Unit - Create 1 dummy - multishot for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
-
Unit - Set level of ArrowMS for (Last created unit) to (Level of Multi Shot for (Casting unit))
-
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
Unit - Order (Last created unit) to Human Archmage - Blizzard TargetMultishot
-
Game - Display to (All players) the text: MS coord 2
-
Game - Display to (All players) the text: ((String((X of TargetMultishot))) + ( + (String((Y of TargetMultishot)))))
-
Set TargetMultishot = ((Position of (Casting unit)) offset by 800.00 towards ((Facing of (Casting unit)) + 20.00) degrees)
-
Unit - Create 1 dummy - multishot for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
-
Unit - Set level of ArrowMS for (Last created unit) to (Level of Multi Shot for (Casting unit))
-
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
Unit - Order (Last created unit) to Human Archmage - Blizzard TargetMultishot
-
Game - Display to (All players) the text: MS coord 3
-
Game - Display to (All players) the text: ((String((X of TargetMultishot))) + ( + (String((Y of TargetMultishot)))))
-
Set TargetMultishot = ((Position of (Casting unit)) offset by 800.00 towards ((Facing of (Casting unit)) - 10.00) degrees)
-
Unit - Create 1 dummy - multishot for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
-
Unit - Set level of ArrowMS for (Last created unit) to (Level of Multi Shot for (Casting unit))
-
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
Unit - Order (Last created unit) to Human Archmage - Blizzard TargetMultishot
-
Game - Display to (All players) the text: MS coord 4
-
Game - Display to (All players) the text: ((String((X of TargetMultishot))) + ( + (String((Y of TargetMultishot)))))
-
Set TargetMultishot = ((Position of (Casting unit)) offset by 800.00 towards ((Facing of (Casting unit)) - 20.00) degrees)
-
Unit - Create 1 dummy - multishot for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
-
Unit - Set level of ArrowMS for (Last created unit) to (Level of Multi Shot for (Casting unit))
-
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
Unit - Order (Last created unit) to Human Archmage - Blizzard TargetMultishot
-
Game - Display to (All players) the text: MS coord 5
-
Game - Display to (All players) the text: ((String((X of TargetMultishot))) + ( + (String((Y of TargetMultishot)))))
-
-
I am attaching the map in case you want to see it yourself. Pick an archer, and here is the screenie (just a bit up from the start) on what your "multi shot" cast has to be like to make the bug happen.
That's it, hoping for someone grateful enough to save me!
There is also another gamebreaking complicated bug, and it is also location-related (but... different location, duh), but much harder to reproduce and I think is connected to this one.