help about Channel Ability

Level 22
Joined
Feb 6, 2014
Messages
2,467
I made a channeling spell (takes 5 seconds to channel) however when it is channeled, the location (or visibility) of the caster is revealed to the target for about 1 second. I tried removing the triggers but it is still revealed. I want to make the target unaware that the ability is being channeled unto him by not revealing the caster's location.

EDIT: There is the notification saying "Our Forces are under attack" even though the Channel Ability has no damage whatsoever and while it is still channeling when I change the Attack Reveal Radius to zero.

I did some research and found this http://www.playdota.com/forums/showthread.php?t=270600

It says:
These are the things which decides whether or not a unit will be revealed:
-Revealed from regular attacks.
-Revealed from hardcoded spells which deal damage or place a buff on the target.
-Not revealed from damage target X triggers.
-Not revealed from Channel based spells which issue an order before the spell goes into effect.

Anyone know how to accomplish the last part "Not revealed from Channel based spells which issue an order before the spell goes into effect"?
 
Last edited:
Level 25
Joined
Aug 18, 2009
Messages
4,081
Regardless whether the ability is meant to deal damage or not, when you cast an ability on a unit and the caster is hostile for the target unit, the caster will cause a damage event, even if the value is 0. That's probably on purpose to ensure pulling aggro.

So one possibility is to change the alliance state on the "starts effect on an ability" event.
 
Level 24
Joined
Aug 13, 2011
Messages
739
It sounds like you're using Follow Through Time to channel. If you Casting Time, there shouldn't be any caster reveal until the spell is fully cast. The only downside with Casting Time is that you'll probably have to trigger its channeling animation (and any other effects you want present) yourself.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
There is something like "reveal" in the trigger session.
In GUI triggers it is in Visibility... I guess.
I havent tried it yet but it should be the same as the reveal spell of the orc wolf-rider-caster-hero-unit-of-which-i-dont-know-the-name-and-just-write-this-so-you-know-who-i-mean.
I think you can also disable the special effect of it... at least you should be able to.
 
Level 22
Joined
Feb 6, 2014
Messages
2,467
It sounds like you're using Follow Through Time to channel. If you Casting Time, there shouldn't be any caster reveal until the spell is fully cast. The only downside with Casting Time is that you'll probably have to trigger its channeling animation (and any other effects you want present) yourself.

And it can be stopped. If it is interrupted then you can cast it again which is not what I want. If I could trigger the cooldown then I would use casting time but I believe I cannot.
 
Level 22
Joined
Feb 6, 2014
Messages
2,467
There is something like "reveal" in the trigger session.
In GUI triggers it is in Visibility... I guess.
I havent tried it yet but it should be the same as the reveal spell of the orc wolf-rider-caster-hero-unit-of-which-i-dont-know-the-name-and-just-write-this-so-you-know-who-i-mean.
I think you can also disable the special effect of it... at least you should be able to.

I want the caster to remain hidden not to be revealed. Btw, the name is Thrall the Far seer
 
Level 22
Joined
Feb 6, 2014
Messages
2,467
Nevermind I managed to solved the problem.

For those who are curios how I did it, I created another trigger having an event "A unit is issued an order targeting an object" and when that triggers, the action includes

JASS:
function Trig_Flesh_Odor_Order_issued_Conditions takes nothing returns boolean
    if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("firebolt") ) ) then
        return false
    endif
    if ( not ( GetUnitTypeId(GetOrderTargetUnit()) != 'h00D' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Flesh_Odor_Order_issued_Actions takes nothing returns nothing
    local unit targetDummy
	local unit target = GetOrderTargetUnit()
    local real x1 = GetUnitX(target)
	local real y1 = GetUnitY(target)
	local integer pNum = GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))
    call SetUnitAnimationByIndex ( GetTriggerUnit() , 8)
    set udg_fleshOdorTarget[pNum] = target
    set targetDummy = CreateUnit( Player(15) , 'h00D', x1, y1, 0.00 )
    call IssueTargetOrderBJ( GetTriggerUnit(), "firebolt", targetDummy )
    loop
	    exitwhen ((IsUnitVisible(udg_fleshOdorTarget[pNum], GetOwningPlayer(GetTriggerUnit()) ) == false) or (GetUnitCurrentOrder(GetTriggerUnit()) != String2OrderIdBJ("firebolt")))
	    set x1 = GetUnitX(target)
	    set y1 = GetUnitY(target)
	    call SetUnitPosition(targetDummy, x1, y1)
            call TriggerSleepAction(0.1)
    endloop
	call KillUnit(targetDummy)
	set targetDummy = null
    set target = null
endfunction

//===========================================================================
function InitTrig_Flesh_Odor_Order_issued takes nothing returns nothing
    set gg_trg_Flesh_Odor_Order_issued = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Flesh_Odor_Order_issued, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
    call TriggerAddCondition( gg_trg_Flesh_Odor_Order_issued, Condition( function Trig_Flesh_Odor_Order_issued_Conditions ) )
    call TriggerAddAction( gg_trg_Flesh_Odor_Order_issued, function Trig_Flesh_Odor_Order_issued_Actions )
endfunction

which immediately change the target to a target dummy therefore not revealing the caster's location. The targeted unit is then stored to a variable udg_fleshOdorTarget[pNum] which I can use in another trigger and "firebolt" is the Order String like this:

  • Events
  • Unit -A unit starts the effect of an ability
  • Conditions
  • Ability being cast Equal to Flesh Odor
  • Actions
  • Set playerNumber = (Player number of (Owner of (Triggering Unit)))
  • //Do Actions here using udg_fleshOdorTarget[playerNumber]
  • //

The loop in JASS is to make the caster continue its order when it is out of range (meaning it will get close to the target) and it will only stop its pursuit when the target is no longer visible.

Just change the model of 'h00D' to none.mdl and it will still work.
 
Top