| 02-06-2007, 03:07 AM | #1 |
Now, I'm sure NO ONE has ever had issues with basing an ability off any kind of auto-castable ability... Anyways, attempting to make a modified searing arrows of sorts, which has an 8/6/4/2 second cooldown...however, if the ability in question is on auto-cast it completely ignores the appropriate cooldown. I'm a DOTA freak, and the Enchantress's Impteus has autocast but works with c/d...so what's the dealio? ======================= Question # 2: I have creeps on my map with a loot table, but I also use a pretty nifty (and small) creep-respawning system that puts them back as they were after X seconds...except the loot tables no longer apply...any explanation on why? The following is the creep respawn system: JASS:function Trig_RespawnInit_Actions takes nothing returns nothing local unit p //will be used to loop through each of the creeps, along with local group g=GetUnitsOfPlayerAll(Player(PLAYER_NEUTRAL_AGGRESSIVE)) //this - the unit group of EACH creep (minus the ones already looped through, you'll see what I mean) local integer eachUnit=0 //and this - the number that represents each creep individually. loop set p=FirstOfGroup(g) exitwhen (p==null) set eachUnit = (eachUnit + 1) set udg_neutral_point[eachUnit] = GetUnitLoc(p) set udg_neutral_type[eachUnit] = p call SetUnitUserData( p, eachUnit ) call GroupRemoveUnit(g,p) endloop call DestroyGroup( g) set eachUnit = 0 endfunction //=========================================================================== function InitTrig_RespawnInit takes nothing returns nothing set gg_trg_RespawnInit = CreateTrigger( ) call TriggerRegisterTimerEventSingle( gg_trg_RespawnInit, 0.01 ) call TriggerAddAction( gg_trg_RespawnInit, function Trig_RespawnInit_Actions ) endfunction JASS:function Trig_Neutral_Respawn_Actions takes nothing returns nothing local integer dyingUnitsCV set dyingUnitsCV = GetUnitUserData(GetDyingUnit()) // Set here because if i just used custom value of the dying unit below the wait, it could be a different dying unit. call TriggerSleepAction( 5.00 ) // This wait could be as long as you want it to be before the creeps respawn. call CreateNUnitsAtLoc( 1, GetUnitTypeId(udg_neutral_type[dyingUnitsCV]), Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_neutral_point[dyingUnitsCV], bj_UNIT_FACING ) // Hopefully now why I used the custom value becomes imminent call SetUnitUserData( GetLastCreatedUnit(), dyingUnitsCV) //set the CV back to the unit because it's lost when the unit dies set dyingUnitsCV = 0 //still not sure whether this leaks. endfunction //=========================================================================== function InitTrig_Neutral_Respawn takes nothing returns nothing set gg_trg_Neutral_Respawn = CreateTrigger( ) call TriggerRegisterPlayerUnitEventSimple( gg_trg_Neutral_Respawn, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH ) call TriggerAddAction( gg_trg_Neutral_Respawn, function Trig_Neutral_Respawn_Actions ) endfunction |
| 02-06-2007, 04:32 AM | #2 |
Both of these are blizzard's issues. Yeh, autocast on attack abilities have cooldown problems. Only ones that start with a cooldown work properly. Try using Black Arrow (Neutral Hostile). Loot tables only apply to preplaced units. |
| 02-06-2007, 08:47 AM | #3 |
Guest | Speaking of auto-cast problems; why, when on auto-cast and attacking, does searing arrows not count as begining the effect of an ability? Is there a way around this? (sorry if I explained this poorly) |
