Another Base Spell

WolfieeifloW

WEHZ Helper
Reaction score
372
I know I've been asking this a lot, but I can't seem to find a suitable spell to base my custom spell off of.
Maybe I'm just overlooking them because I'm trying so hard to find them..

Anyways,
This time, I need a spell that's an attack modifier, not auto-cast, and active.
I need two, actually, but I can live with one.

Attack modifier meaning adds onto the unit's normal attack.
Does the units normal damage + the spells damage.
Think Searing Arrow, Black Arrow, etc.
 
This time, I need a spell that's an attack modifier, not auto-cast, and active.

What do you mean, "attack modifier"? You mean, like Roar? Or something else? It'd be useful to know what your goal is.
 
Roar increases attack damage, or decreases, Howl Of Terror increases/decreases both attack speed and attack damage (Damage is unverified)
 
I mean something like Searing Arrows, Black Arrow, etc.
Something that just adds onto an attack (Does normal damage + spell damage).
 
Maybe I'm missunderstanding you but there is no active non-autocast attack modifier in the game. sure you don't want a passive one?

Othervise i guess you would have to trigger it.

Edit:
An easy way to trigger it would be to base your spell on a active ability, when casted you create a dummy hero unit at the location of your caster, give the dummy the same items as your hero and the same level, add a short death timer so he only has time to attack once and order him to attack the target unit of the spell. The only difference between your attack and the dummy's attack damage would be if you had some sort of damage buff on your caster.
 
There's none?
Darnit..

I know, or at least I'm pretty sure, there's a way to detect a player trying to auto-cast a spell?
Couldn't I just use an auto-cast spell, but make the icon without the yellow borders, then just trigger it so if the player tries to auto-cast it, it won't let them?
 
You can, by issuing the order "unflamingarrows" when a unit is issued "flamingarrows". Then make the icon a normal BTN, so that players don't suspect it to be an autocast ability in the first place. It works with several DotA spells, like Lich's Dark Ritual and Dark Seer's Surge.
 
Hmm, this doesn't seem to work:

JASS:
scope UnMangle initializer UMInit

    private function UMConditions takes nothing returns boolean
        call BJDebugMsg("Running Conditions")
        if (GetIssuedOrderId() == OrderId("flamingarrows")) then
            call BJDebugMsg("Passed conditions")
            call IssueImmediateOrder(GetTriggerUnit(), "unflamingarrows")
        endif
        return false
    endfunction
    
    private function UMInit takes nothing returns nothing
        local trigger t = CreateTrigger()
        
        call BJDebugMsg("Running!")
        
        call TriggerRegisterPlayerUnitEvent(t, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER, null)
        call TriggerAddCondition(t, Condition(function UMConditions))
    endfunction

endscope

It shows all messages, but doesn't turn off the arrows.
 
you need to use 0.00s timer: issue "flamingarrows" -> 0.00s timer -> issue "unflamingarrows"

JASS:
scope UnMangle initializer UMInit
    globals
        private unit TEMPUNIT
        // use one global unit for the callback of the timer
        // this is not really safe but I think the chance for it to screw up is really low
        private timer TEMPTIMER = CreateTimer()
    endglobals
    
    private function CallBack takes nothing returns nothing
        call BJDebugMsg("Turn off arrows")
        call IssueImmediateOrder(TEMPUNIT, "unflamingarrows")
    endfunction

    private function UMConditions takes nothing returns boolean
        call BJDebugMsg("Running Conditions")
        if (GetIssuedOrderId() == OrderId("flamingarrows")) then
            call BJDebugMsg("Passed conditions")
            set TEMPUNIT = GetTriggerUnit()
            call TimerStart( TEMPTIMER, 0.00, false, function CallBack )
        endif
        return false
    endfunction
    
    private function UMInit takes nothing returns nothing
        local trigger t = CreateTrigger()
        
        call BJDebugMsg("Running!")
        
        call TriggerRegisterPlayerUnitEvent(t, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER, null)
        call TriggerAddCondition(t, Condition(function UMConditions))
    endfunction

endscope
 
I usually use this:

Ability Type: Abilities that apply a buff (eg: Auto-cast Black Arrow or Passive Slow Poison)

Event - A unit is attacked
Conditions - Level of Ability for Attacking Unit is greater than or equal to 1
Actions - Wait For Condition(Attacked Unit has Buff is Equal to True)
Cause Attacking Unit to damage Attacked Unit dealing X damage of damage type X and attack type Z
 
>However, is there anyway to make it not do the.. 'ting' sound?

unfortunately, no :(

oh, and I just found this:

JASS:
scope UnMangle initializer UMInit
    globals
        private unit TEMPUNIT
        // use one global unit for the callback of the timer
        // this is not really safe but I think the chance for it to screw up is really low
        private timer TEMPTIMER = CreateTimer()

        private constant integer  ABILITY_ID = 'AHfa'  //your ability
    endglobals
    
    private function CallBack takes nothing returns nothing
        call BJDebugMsg("Turn off arrows")
        call SetPlayerAbilityAvailable(GetOwningPlayer(TEMPUNIT),   ABILITY_ID   , true)   // enable
    endfunction

    private function UMConditions takes nothing returns boolean
        call BJDebugMsg("Running Conditions")
        if (GetIssuedOrderId() == OrderId("flamingarrows")) then
            call BJDebugMsg("Passed conditions")
            set TEMPUNIT = GetTriggerUnit()
            call SetPlayerAbilityAvailable(GetOwningPlayer(TEMPUNIT),   ABILITY_ID   ,false)  // disable
            call TimerStart( TEMPTIMER, 0.00, false, function CallBack )
        endif
        return false
    endfunction
    
    private function UMInit takes nothing returns nothing
        local trigger t = CreateTrigger()
        
        call BJDebugMsg("Running!")
        
        call TriggerRegisterPlayerUnitEvent(t, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER, null)
        call TriggerAddCondition(t, Condition(function UMConditions))
    endfunction

endscope


instead of issue "unflamingarrows": do "disable ability" -> timer 0.00 -> "enable ability"
this way, the order of the unit will NOT be interrupted :D
 
Thank you :) !
I chucked a SimError in there to make it look pretty:
JASS:
scope UnMangle initializer UMInit

    globals
        private unit TEMPUNIT
        private timer TEMPTIMER = CreateTimer()
        private constant integer ABILITY_ID = 'A00C'  //your ability
    endglobals
    
    private function CallBack takes nothing returns nothing
        call SetPlayerAbilityAvailable(GetOwningPlayer(TEMPUNIT), ABILITY_ID, true)
    endfunction

    private function UMConditions takes nothing returns boolean
        if (GetIssuedOrderId() == OrderId("flamingarrows")) then
            set TEMPUNIT = GetTriggerUnit()
            call SetPlayerAbilityAvailable(GetOwningPlayer(TEMPUNIT), ABILITY_ID, false)
            call TimerStart(TEMPTIMER, 0.00, false, function CallBack)
            call SimError(Player(0), "This spell isn't auto-cast!")
        endif
        return false
    endfunction
    
    private function UMInit takes nothing returns nothing
        local trigger t = CreateTrigger()
        
        call TriggerRegisterPlayerUnitEvent(t, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER, null)
        call TriggerAddCondition(t, Condition(function UMConditions))
    endfunction

endscope
 
However, is there anyway to make it not do the.. 'ting' sound?
You could overwrite the native "ting" sound with an imported small silent sound file, then re-import the actual "ting" sound and trigger it to play for other autocast abilities... :cool:
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top