| 08-04-2008, 04:40 PM | #1 | |
I'm experiencing a strange bug, in a shooter type map (ET2). Basically at any given time there are generally tonnes of projectiles & particle flying all over the place with periodic movement & grouping. For a projectile to 'impact' onto a unit I simply check for 3 things. Is it alive, not invulnerable & not have a specific buff (An item can give this buff temporarily).
thx |
| 08-04-2008, 04:43 PM | #2 |
You don't destroy boolexprs (unless created from AND or OR, but blargh). Condition(function DeadUnit) == Condition(function DeadUnit) Thus, destroy one, you destroy all. |
| 08-04-2008, 04:45 PM | #3 |
Added code to main thread. So use conditions instead your saying? |
| 08-04-2008, 04:45 PM | #4 |
The unit can be dead and have more than 0.405 hp. With a trigger action or a buggy ability. http://www.wc3campaigns.net/showthread.php?t=101654 |
| 08-04-2008, 04:48 PM | #5 | |
Quote:
I meant Filter. Anyway, don't use DestroyBoolExpr(b); boolexprs created from functions don't leak, but get cached, and if you destroy it, then all instances of boolexprs created from that function will be destroyed. Alternatively, if you ever set a dead unit to have HP > 0.405, then, as troll-brain said, it can bug. |
| 08-04-2008, 04:52 PM | #6 |
Ok I'll try this then: JASS:IsUnitType(unit, UNIT_TYPE_DEAD) |
| 08-04-2008, 11:52 PM | #7 |
what problem? projectiles collide with nothing or ignore units? |
| 08-05-2008, 01:20 AM | #8 |
Yes you didn't mention what problem you were experiencing. Also why do you use GetUnitLoc/GetLocationXY/RemoveLocation when you can just use GetUnitXY. |
| 08-05-2008, 04:42 AM | #9 |
He also check unit's height by location, this function looks incomplete. |
| 08-05-2008, 07:28 AM | #10 | |
Quote:
The problem is/was that often projectiles would collide with dead units/corpses. I'll have to see how it goes with the new boolean thou & report back. |
| 08-05-2008, 10:03 AM | #11 |
There is one unit per player and some barrels\barricades, you can mark them by youself, if UNIT_DEATH triggers set costom value to 0 and check it. This is much more better then unit state and widget life both, since 0 CS unit is already removed or dead and this surely known. |
