HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Can Player(12) cast dummy spells?

12-28-2009, 12:00 PM#1
thehellman
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)
endfunction

It 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
Deaod
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
thehellman
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
Bobo_The_Kodo
Quote:
On another unrelated note, should you ever set a local boolexpr to null?
Only if its created by using And() or Or() functions