Jump to content
EleTD.com
Sign in to follow this  
Guest emjlr3

Spout Bug

Recommended Posts

Guest emjlr3

Karawasa may or may not have told you to ignore any Spout related bugs

in any case, I have made some recent developments in its coding flaw that may possibly address this bug, no guarantees however

point being, if anyone experiences the Spout bug, please upload a replay, with a brief description of what occurred, when, the conditions, and your thoughts on what might have been going on/happened when it bugged

thnx!

Share this post


Link to post

i've a decent number of games with the spout bug.

the first is in beta4: a poison+hydro tower at level 16 always result in the undead bug. (may be undead related)

the other occurances usually when the aoe slow towers(especially roots)+single target slow tower are in play.

also more likely to occur in end-game with lvl2 and lvl3 hydro(can't remember the name) Maybe due to the higher hp where units are not so easily killed and have a chance to land and bug.

had a few spout bugs with this set-up: DNEW lvl 60: build was lvl2 roots, lvl2 muck, lvl3 poison, lvl2hydro, 3? lvl3 hydro, 2 pure E.

one thing i would ask: if a unit is in mid-air, can the unit be spouted again? another possibility is a unit being spouted immediately after landing from a previous spout (somehow leads to stuck units).

i'll get to the replays later when i find them.

Share this post


Link to post

Me and Rodead tried a quick test.

I tried spout, seemed god at first but later on the bug occured.

You could think its better because the units get stuck but no, they wont be tossed into the air and wont deal the AoE damage. (I think, feelt like that got replay here: http://rapidshare.com/files/73423945/Be ... o.w3g.html)

Did not work on undead units, maybe because they reincarn when they die and leave no body. Also if you leaked a unit once it seemed to be bugged.

I actually don't know wy the bug occurs.

Share this post


Link to post
Guest Sancdar

For reference: the bug starts at 25 minutes in for 13est's replay. I don't think it had anything to do with leaks, because the first instance I saw was on a furbolg running up the right side on its first pass. I also didn't get affected by the bug in a game where I was using 3 hydro towers, and I certainly leaked creeps.

Consecutive spouts on a single creep looked to be working fine, and I had a few instances of multiple creeps being spouted at the same time with no issues.

emjlr3, would you mind posting the code so those of us who know some JASS can take a look? I'm no expert, but maybe you're just getting hit by one of the many confusing flaws in the language and someone else will spot it.

Share this post


Link to post
Guest emjlr3

from what you guys have said, the error I found to have made before, which is fixed for the next release, may very well fix this bug, we shall wait and see

//Implementation: *create passive ability to be detected
//                *copy over trigger, config
//Documentation:  Really neat.  Imported a custom model, that may or may not fit the theme of the tower, though is sure looks neat.

scope Spout

globals
    //config options:
    private constant integer abil_id = 'A002' //abil rawcode
    private constant real duration = 2.5//duration of rise and fall
    private constant real change = 20. //starting change in height
    private constant real break = .95 //reduction/increase in height change per run, which swaps halfway through the effect (.01-.99)
    private constant real area = 200. //area for damage
    private constant string sfx1 = "war3mapImported\\TidalErruption.mdx" //effect created at hit
    private constant string sfx2 = "" //effect created upon landing
    private constant real chance = .5 //chance to fire (0.0-1.0)
    
    //needed globals:
    private timer Tspout = CreateTimer()
    private integer Total = 0
    private Spout_data array structArray
    private group mainG = CreateGroup()
endglobals
private function get_damage takes integer lvl returns real
    return 5.*lvl //damage done given the level
endfunction

//get re-order loc
private function move_loc takes unit u returns nothing
    local location l
    
    //set l = GetRectCenter(udg_Region_Leak[GetUnitUserData(u)-1]) //this orders the unit to the leak region again, check this and make sure it is correct by
    // ordering a unit to the leak region in GUI and converting it
    set l = GetRectCenter(gg_rct_End)
    call IssuePointOrderLoc(u,"move",l)
    call RemoveLocation(l)
    
    set l = null
endfunction
//================================================================================
=======
//needed struct
struct Spout_data
    unit attacker
    unit target
    real time = 0.0
    real height = 0.0
    real change = 0.0
    
    method Start_Spout takes unit atkr, unit targ returns nothing
        set .attacker = atkr
        set .target = targ
        set .change = change
        
        call DestroyEffect(AddSpecialEffectTarget(sfx1,targ,"origin"))
        call PauseUnit(targ,true)
        call UnitAddAbility(targ,FlyTrick)
        call UnitRemoveAbility(targ,FlyTrick)
        call GroupAddUnit(mainG,targ)
    endmethod
    method Spout_Effects takes nothing returns nothing
        if .time<duration/2. then
            set .height = .height + .change
            call SetUnitFlyHeight(.target,.height,0.0)
            set .change = .change * break
        else
            set .height = .height - .change
            call SetUnitFlyHeight(.target,.height,0.0)
            set .change = .change * (2-break)
        endif
        set .time = .time + .02
    endmethod
    method onDestroy takes nothing returns nothing
        call DamageEnemiesArea(.attacker,area,GetUnitX(.target),GetUnitY(.target),get_damage(
GetUnitAbilityLevel(.attacker,abil_id)),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
        call DestroyEffect(AddSpecialEffectTarget(sfx2,.target,"origin"))
        call SetUnitFlyHeight(.target,0.0,0.0)
        call PauseUnit(.target,false)
        call move_loc(.target)
        call GroupRemoveUnit(mainG,.target)
    endmethod
endstruct  

//movement and effects
function Spout_Move takes nothing returns nothing
    local integer i = 1
    local Spout_data dat
    
    loop
        exitwhen i > Total
        set dat = structArray[i]
        
        if dat.time>=duration then
            call dat.destroy()
            set structArray[i] = structArray[Total]
            set Total = Total - 1
            set i = i - 1              
        else
            call dat.Spout_Effects()  
        endif
        
        set i = i + 1
    endloop
    
    if Total==0 then
        call PauseTimer(Tspout)
    endif
    //call Msg("Run",Player(0))
endfunction
//starts the effects
function Trig_Spout_Actions takes nothing returns nothing
    local unit attacker = GetEventDamageSource()
    local unit target = GetTriggerUnit()
    local Spout_data dat
      
    if GetRandomReal(0.0,1.0)<chance and GetUnitAbilityLevel(attacker,abil_id)>0 and not IsUnitInGroup(target,mainG) then
        set dat = Spout_data.create()
        call dat.Start_Spout(attacker,target)
      
        set Total = Total + 1
        set structArray[Total] = dat  
        if Total==1 then
            call TimerStart(Tspout,.02,true,function Spout_Move)
        endif  
    endif
    
    set attacker = null  
    set target = null
endfunction

endscope

//==== Init Trigger Spout ====
function InitTrig_Spout takes nothing returns nothing
    call DamDetect_Attacks("Trig_Spout_Actions")
endfunction

Share this post


Link to post
Sign in to follow this  

×
×
  • Create New...