[Trigger] Strange 2.5D Knockback System Issue

Status
Not open for further replies.
Level 7
Joined
Aug 11, 2010
Messages
269
To be brief; I posted this same message in bribe's 2.5D Knockback thread, but I figured this section might gain a bit more traction. I tried to get as much information that might be relevant as possible; but if I missed something please feel free to let me know.

I'm currently working on a spell with an AoE knockback which I decided to use bribe's knockback system for, though -- it's been causing a TON of trouble for me and neither me, nor my friend can figure out the cause of it; but we can replicate it on this map with relative ease. At the map cords of 4095, -1290 (Z point of 65, if that matters?) the unit gets stuck on what seems to be nothing, but continues the knockback; there's no pathing blockers or anything that would otherwise hinder movement (the tiles are also buildable, again; if that helps at all). Perhaps the strangest thing of all -- the opposite side of the map (cords of -4095, -1290 (Z point of 62) works just fine. No issues at all.

I could really use some help figuring out what causes this strange bug; since it's quite a big issue. Here's the triggers (please; bare in mind that I've stripped these triggers down and redone them multiple times so they're in a very crude hap-hazard state, so... Just be warned, there's leaks and a few pointless functions that are tossed about for testing purposes)


Projectile is Removed; AKA knockback portion of the trigger
  • HEDM Explosive Cask Missile Remove
    • Events
    • Conditions
    • Actions
      • -------- ---------- [Start Trigger Actions] ---------- --------
      • Set Missile__TempLoc = (Position of Missile__Dummy)
      • Set TempUnitGroup = (Units within 325.00 of Missile__TempLoc)
      • Unit - Create 1 (Dummy) Dummy, General for (Owner of Missile__Source) at Missile__TempLoc facing Default building facing degrees
      • Unit - Turn collision for (Last created unit) Off
      • Unit - Add Invulnerable (Neutral) to (Last created unit)
      • Unit - Move (Last created unit) instantly to Missile__TempLoc
      • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
              • Unit - Cause (Last created unit) to damage (Picked unit), dealing 2.00 damage of attack type Spells and damage type Normal
            • Else - Actions
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • -------- ---------- [End Trigger Actions] ---------- --------
Damage is Dealt from Knockback Unit
  • Untitled Trigger 002
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (Level of (Ability Boolean) Dummy Unit for DamageEventSource) Equal to 1
    • Actions
      • Set CenterPoint = (Position of DamageEventSource)
      • Set TargetPoint = (Position of DamageEventTarget)
      • Set Knockback2DAngle = (Angle from CenterPoint to TargetPoint)
      • Custom script: call RemoveLocation(udg_CenterPoint)
      • Custom script: call RemoveLocation(udg_TargetPoint)
      • Set Knockback2DTime = 0.90
      • Set Knockback2DDistance = 500.00
      • Set Knockback2DUnit = DamageEventTarget
      • Set Knockback2DBounces = False
      • Set Knockback2DPause = True
      • Set Knockback2DCollision = -5.00
      • Trigger - Run Knockback 2D <gen> (checking conditions)


If it helps; I'm using BPower's Projectile System, Bribe's Indexing System, Bribe's Damage Engine, Guhun's Disable System, and Weitlol's Effect Over Time system.

Anyone who could help me with this issue would be an absolute Hero, as I've fiddled with it for the majority of seven hours and haven't got anything working; countless iterations and still nothing seems to be working. What makes me so confused is the fact that it's ONLY an issue for one side, and not the other.
 
Level 7
Joined
Aug 11, 2010
Messages
269
I haven't been able to reproduce the bug you talk about.

Oops, that's probably because the Level 1 Panda is the one where the bug was happening; I was a bit too quick and added him in without checking his level first.

Sorry for the laggy video; but I figured it'd help to show you precisely what I'm talking of; and it's like this for a few (seemingly random) other parts of the map, as well. It's in this specific spot, place that I've pin-pointed it.

As you'll see in the video; the knockback is supposed to be much greater but he's paused at that one spot, and then he's stuck for the next barrel, which still is supposed to knock it back.

 
Holy crap that is super weird. The knockback system acts as though something is there when there isn't. I'll take a more in-depth look after the Hero Contest is over.

the speed of the knockback is inversely proportional to the distance of the Pandaren Brewmaster
The speed is proportional to the distance. However, the distance is constant.
 
Level 7
Joined
Aug 11, 2010
Messages
269
Judging by the replay, the speed of the knockback is inversely proportional to the distance of the Pandaren Brewmaster. Perhaps that is the case?

Unfortunately, that's not the issue. I've tried a variety of speeds and duration and nothing seems to make a difference to the system, it still causes issues. But thanks for the suggestion! :D

Holy crap that is super weird. The knockback system acts as though something is there when there isn't. I'll take a more in-depth look after the Hero Contest is over.


The speed is proportional to the distance. However, the distance is constant.

It REALLY is weird! It's perhaps the strangest thing I've ever discovered while mapping, it works in certain areas of the map just fine; but for some weird reason on certain axis it just don't work like it should. It seems like if you turn on the grid in the editor most of the problem areas are on the gold-mine line right behind the Pandaren. But... I see no correlation with WHY it's doing it. It's only doing it on the red team's side too, to make things even stranger. The map is perfectly mirrored, and the coordinates are flipped depending on what side you're on, so in theory -- if it was those specific coordinates being bugged it should've done the same issue on the other side of the map but strangely it doesn't.

Like I said in my intro post; me and my friend tested the system in countless different iterations over the course of seven or so hours. The bug just doesn't make much sense to us, lol! I'm relieved to hear that you'll take a look at it after the contest, though. I really love the idea of having knockbacks in my map.

Try dropping an item on that spot. Perhaps you've discovered a situation where the terrain is walkable but the item won't stick there, or the other way around.

I don't know if I'm doing it right, but I tried dropping the items atop the land where the unit usually gets stuck; the item seems(?) to be just fine. Though, I wasn't creating them with a trigger but merely adding them to a Hero's inventory in the editor and dropping them.

For future readers I've decided to include a link to my map, so that maybe something can be learned from the map itself.
RuinsMobaProgressv0.6 | HIVE

I appreciate every comment and suggestion!
 
Your test map works fine when I imported alternative knockback system, so I assume the problem is indeed related with KB2D.
First I thought KB collides with missle (or other dummy unit) as missle is destroyed about ~1sec after "missleRemove" trigger execution. This trigger by dealing damage - starts KB.
But after unhiding unit KB trees harvester it seems that this unit blocks Panda hero. So maybe abandom SetUnitX/Y for harvester is a good idea inside KB2D? BPower used this:
JASS:
(IssueTargetOrderById(harvester, HARVEST_ORDER_ID, d)) and (IssueImmediateOrderById(harvester, 851973)) // stunned order
That keeps harvester still at map center. Also I'm curious if you tested KB2d for event when kb-ed unit (while is still moving by the system) - is removed for the game, @Bribe ? I remember I had a problem with such an event (but maybe cause I use unit group, but you are using diffrent indexing method) and I solved this by using your UnitEvent event "UnitIndexEvent==2"
 
Level 7
Joined
Aug 11, 2010
Messages
269
Your test map works fine when I imported alternative knockback system, so I assume the problem is indeed related with KB2D.
First I thought KB collides with missle (or other dummy unit) as missle is destroyed about ~1sec after "missleRemove" trigger execution. This trigger by dealing damage - starts KB.
But after unhiding unit KB trees harvester it seems that this unit blocks Panda hero. So maybe abandom SetUnitX/Y for harvester is a good idea inside KB2D? BPower used this:
JASS:
(IssueTargetOrderById(harvester, HARVEST_ORDER_ID, d)) and (IssueImmediateOrderById(harvester, 851973)) // stunned order
That keeps harvester still at map center. Also I'm curious if you tested KB2d for event when kb-ed unit (while is still moving by the system) - is removed for the game, @Bribe ? I remember I had a problem with such an event (but maybe cause I use unit group, but you are using diffrent indexing method) and I solved this by using your UnitEvent event "UnitIndexEvent==2"

Dang! I was really hoping that if I removed collision and added the Ability Boolean (Dummy) ability to the ghoul it would've worked as it was intended too; but unfortunately it didn't. Still -- REALLY good suggestion, it seemed very plausible and whilst using this system I'll definitely be mindful of the harvester unit. Unless I'm doing something wrong; the ghoul isn't the issue for this specific problem.

Unfortunately I don't quite understand what you're suggesting with the last bit of your post, could you reiterate?
 
You're right @Nolyp , unfortunately, the problem is not related with ghoul harvester unit. I was to quick in judging. By setting Knockback2DKillTrees=false I kept harvester at the map center but the problem still persist. By the way missle dummy and your Dummy General units are locusted, so they are not enumerated by GroupEnumUnitsInRange used by knockback systems. So they shouldn't by sources of collision. To be honest - like ghoul harvester also..
It is not related to the problem but as general dumy units use "Movement type-none" and collision 0.01, instead of 0.00 and "fly" like in your general dummy
Unfortunately I don't quite understand what you're suggesting with the last bit of your post, could you reiterate?
My suggestion was for Bribe and KB2D system core.
One thing I am sure: it is KB issue and moreover knockbacked Panda looks very ugly, the movement is jagged, not smooth - even when not stuck at one place. It must be something deeper in KB2D system code I'm affraid. I can tell this after comparing both knockback systems in your map.
 
Level 7
Joined
Aug 11, 2010
Messages
269
You're right @Nolyp , unfortunately, the problem is not related with ghoul harvester unit. I was to quick in judging. By setting Knockback2DKillTrees=false I kept harvester at the map center but the problem still persist. By the way missle dummy and your Dummy General units are locusted, so they are not enumerated by GroupEnumUnitsInRange used by knockback systems. So they shouldn't by sources of collision. To be honest - like ghoul harvester also..
It is not related to the problem but as general dumy units use "Movement type-none" and collision 0.01, instead of 0.00 and "fly" like in your general dummy
My suggestion was for Bribe and KB2D system core.
One thing I am sure: it is KB issue and moreover knockbacked Panda looks very ugly, the movement is jagged, not smooth - even when not stuck at one place. It must be something deeper in KB2D system code I'm affraid. I can tell this after comparing both knockback systems in your map.

Yeah, I notice that too but that might be the simple fact that I messed around with the knockback configuration; I've tried so many different fixes to attempt to get it working. I think I swapped on the Robust Pathing, or something? Maybe. Out of curiosity what knockback system did you use to test the map with? the 3DKB system?

As the item drop method seemed to allow placement it must be a bug with the IsTerrainPathable native which I think is used. I can add a boolean to disable that check.

Yeah, I seen
JASS:
elseif udg_K2DFlying[udg_UDex] then
        return not IsTerrainPathable(udg_K2DX, udg_K2DY, PATHING_TYPE_FLYABILITY)
in your script. Perhaps that has something to do with it, given what you're saying?
 
Level 7
Joined
Aug 11, 2010
Messages
269
Yeah, it looks like setting Knockback2DRobustPathing=0 makes system work a little better, but still movement is not smooth, RobustPathing set to 2 causes Panda to stuck in more often.
Look at edited map, by pressing ESC in game you're switching between 2 knockbacks to see them in action.

Hrm... Strangely enough it works! I tried RobustPathing 1 and 2 -- but never tried 0 since it says the collision of the unit needed to be 16. I greatly appreciate the help! It seems to be working just fine now.
 
Hrm... Strangely enough it works! I tried RobustPathing 1 and 2 -- but never tried 0 since it says the collision of the unit needed to be 16. I greatly appreciate the help! It seems to be working just fine now.

The 0 size is fine and is what every other pathing system uses. The only problem with it is that if the unit is quite large it can potentially get stuck in a zone it can't get out of. Not a problem if your map doesn't feature it, but unpredictable things can still happen like getting caught on trees.
 
Status
Not open for further replies.
Top