HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Looking for a base channeling ability that...

04-04-2007, 09:03 PM#1
DaKaN
targets a unit and leaves a buff on the target or even the caster. Drain mana/life don't leave a buff on the target or caster, arial shackels stuns the target while casting, dont want that, the "chanel" neutral ability doesnt seem to work at all.. running out of ideas, little help?

(it doenst matter what the effect of the ability does as long as it doesnt disable the unit totally, i just need a buff to appear while channeling on the target or caster)
04-04-2007, 09:12 PM#2
Centreri
Can't you do that manually? I'm not sure, but I think there was a 'Unit - add buff' or something.
04-04-2007, 09:48 PM#3
DaKaN
i saw a unit remove buff, but not an add buff, adding a buff would be my best choice yeah
04-04-2007, 10:24 PM#4
Castlemaster
If you want a channeling ability (caster must remain still while creating a continuing effect), why not use channel? May sound stupid, but just modify it so it gives the buffs you want under "Stats--Buffs" while you create the desired effect.
04-04-2007, 10:36 PM#5
Centreri
I assumed from the question that it had no 'Buff' category, but that's what most of the buff-inducing abilities have.
04-04-2007, 10:37 PM#6
DaKaN
Quote:
Originally Posted by DaKaN
the "chanel" neutral ability doesnt seem to work at all..


tried it, and from my experience if the ability doesnt have a buff to start with, adding it to the code does nothing
04-05-2007, 12:01 AM#7
TRouBLe_MaKeR
Quote:
Originally Posted by Centreri
Can't you do that manually? I'm not sure, but I think there was a 'Unit - add buff' or something.

With a risk to get off topic it's at the trigger actions "Special Effect - create special effect on a unit" This should help to put a desired effect or buff to the unit you want
04-05-2007, 12:19 AM#8
Pheonix-IV
It doesn't add an actual buff though, he's after the little icon that appears in the unit status bar.
04-05-2007, 02:36 AM#9
Pyrogasm
Just create a spell based off of slow that does absolutely nothing (dummy spell). Then, add the buff you want to it and change the duration of the spell to that of your channeling spell.

Then, detect when a unit begins channeling that spell and order a dummy unit to cast the slow-based spell on the target:
Trigger:
Collapse Events
Unit - A unit starts the effect of an ability
Collapse Conditions
(Ability being cast) equal to YOUR ABILITY
Collapse Actions
Set TempPoint equal to (Position of (Triggering Unit))
Unit - Create 1 YOUR DUMMY for (Owner of (Triggering Unit)) at TempPoint facing Default Building Degrees
Custom script: call RemoveLocation(udg_TempPoint)
Unit - Add YOUR DUMMY ABILITY to (Last created unit)
Unit - Set level of YOUR DUMMY ABILITY for (Last created unit) to (Level of (YOUR ABILITY) for (Triggering Unit))
Unit - Order (last created unit to (Human Sorceress - Slow) (Triggering Unit))
Unit - Add a 1.00 second generic expiration timer to (Last created unit)

To remove the buff if necessary would be a bit trickey, since there is no way to reference what unit is being cast upon. To do this, set the unit equal to a variable (will limit MUI, though) and do this: (make sure to use both events!)
Trigger:
Collapse Events
Unit - A unit stops channeling an ability
Unit - A unit finishes channeling an ability
Collapse Conditions
(Ability being cast) equal to YOUR ABILITY
Collapse Actions
Unit - Remove YOUR BUFF from (YOUR VARIABLE)
04-05-2007, 05:15 AM#10
DaKaN
maybe I should have totaly explained my end result and not the method I am trying to use... but I figured out a way to do what I wanted here is the code:

There is more behind the code, but this little trigger allows me to do what I needed to do without getting the buff icon:

Code:
function Trig_DrainSpiritEvent_Actions takes nothing returns nothing
    if (GetSpellAbilityId() =='A01F') then

     if (GetTriggerEventId() == EVENT_PLAYER_UNIT_SPELL_CHANNEL) then
      set udg_spell_DrainSpiritOn[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
      return
     endif

     if (GetTriggerEventId() == EVENT_PLAYER_UNIT_SPELL_ENDCAST) then
      set udg_spell_DrainSpiritOn[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = false
      return
     endif

    endif
endfunction

//===========================================================================
function InitTrig_DrainSpiritEvent takes nothing returns nothing
    set gg_trg_DrainSpiritEvent = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_DrainSpiritEvent, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_DrainSpiritEvent, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
    call TriggerAddAction( gg_trg_DrainSpiritEvent, function Trig_DrainSpiritEvent_Actions )
endfunction

long story short, i solved it, but thanks for the help and ideas
04-05-2007, 05:28 AM#11
Pyrogasm
Blast. Why didn't you say you were using JASS? ><
04-06-2007, 07:48 PM#12
DaKaN
heh, i only use JASS, cant stand GUI at all