Closed lightbluepoppy closed 1 year ago
facing same issue, some solution?
same here
The issue is that isSomethingInFront()
can return true
when that "something" is a wall, and not a unit. In that case, getUnit()
will return undefined
, and anything you call on it will return an error (e.g. Cannot read property 'isEnemy' of undefined
).
You can update the definition of isEnemyInFront
to check isSomethingInFront && !isWallInFront
.
Environment
Steps to reproduce
On website
Baby Steps - Level 6
Expected Behavior
Actual Behavior