| 12-28-2009, 12:00 PM | #1 |
I'm getting a very frustrating and weird bug in my game. In single player my dummy units are casting spells just fine. Then as soon as I go into multiplayer, they just don't cast the ability at all. Is there some WC3 bug regarding Player(12) dummy units not being able to cast spells or something? My function isn't particularly complicated. Code:
public function PointAbility takes unit caster, real x, real y, integer spellId, string order returns nothing
local unit d = CreateUnit(GetOwningPlayer(caster), 'h000', GetUnitX(caster), GetUnitY(caster), 0)
call UnitAddAbility(d, spellId)
call IssuePointOrder(d, order, x, y)
endfunctionIt gets called here Code:
private function ShockwaveCb takes nothing returns nothing
local timer t = GetExpiredTimer()
local data d = GetTimerData(t)
local integer i = 0
local real x = GetUnitX(d.u)
local real y = GetUnitY(d.u)
local real dx = 0
local real dy = 0
loop
set dx = PolarProjectionX( x,100, i*45 )
set dy = PolarProjectionY( y,100, i*45 )
call PointAbility(d.u, dx, dy, 'A01U', "carrionswarm")
call InstantEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl", dx, dy)
set i = i + 1
exitwhen i > 9
endloop
... other code left out, since it doesn't have to do with it, and it's long.The InstantEffect function just create an effect, and it's show in-game. So the code is being executed after PointAbility, it's not like it's stopping the code. This also means that dx and dy are valid points, since the effect shows up at those coordinates. Any help would be grreatly appreciated. |
| 12-28-2009, 02:46 PM | #2 |
did you make sure your dummy casters live long enough? Did you make sure your dummy casters have a castpoint of 0.000? |
| 12-28-2009, 06:51 PM | #3 |
Yes, and yes. On an unrelated note, I'm looking into the possibility that my damage system could be interfering with it. On another unrelated note, should you ever set a local boolexpr to null? |
| 12-28-2009, 11:52 PM | #4 | |
Quote:
|
