Spellpack Blood Mage's Flame

Gj, I'm impressed!

Gj waaaks! I'm impressed, it is a good code.

Though there is one thing that you always forget:

GetTriggerUnit() does not need to be set to a variable...

GetTriggerUnit() works and gets the triggering unit. I believe you should only assign it to a variable when passing it through functions...

So, you can just edit your code to this:

(btw: GetTriggerUnit() does not need to be a constant, constants are usually used for strings, rawcodes, and other modifiable things)

JASS:
//**************************************************************************************************
//*Requires the CasterSytem get it now on <a href="http://www.wc3campaigns.net/vexorian" target="_blank" class="link link--external" rel="nofollow ugc noopener">www.wc3campaigns.net/vexorian</a>                            *
//*Polymorph: copy first the latest dummy from the caster system then copy this trigger to your map*
//*and change some fields below                                                                    * 
//**************************************************************************************************

//#Polymorph start#
constant function rpoly takes nothing returns integer
    return &#039;A000&#039; // raw code for polymorph
endfunction

constant function rhex takes nothing returns integer
    return &#039;A001&#039; // raw code of the hex ability used on enemies
endfunction

constant function rstorm takes nothing returns integer
    return &#039;AHtb&#039; //  raw code of the storm bolt, i used normal storm bolt from human
endfunction

constant function shex takes nothing returns string
    return &quot;hex&quot; // base string id for the hex ability
endfunction

constant function sstorm takes nothing returns string
    return &quot;thunderbolt&quot; // base string id for the normal stormbolt
endfunction

constant function tdelay takes nothing returns real
    return 0.35 // the delay on hexing and stunning units again
endfunction

function Trig_Polymorph_Conditions takes nothing returns boolean
    return ( GetSpellAbilityId() == rpoly() )
endfunction

function Polymorph_NoTrig takes nothing returns boolean
    return ( GetTriggerUnit() != GetFilterUnit() )
endfunction

globals
    boolexpr Polymorph_Filter = null
endglobals

function Trig_Polymorph_Actions takes nothing returns nothing
    local group g = CreateGroup()
    local real x = GetUnitX(GetTriggerUnit())
    local real y = GetUnitY(GetTriggerUnit())
    local integer i = 1
    local integer n = GetHeroSkillPoints(GetTriggerUnit()) + 2 // skillpoints of the caster +2 
    call CS_EnumUnitsInAOE(g, x, y, 500.0, Polymorph_Filter)
    loop
        exitwhen i&gt;n
        call PolledWait(tdelay())
        call CasterCastAbilityGroup(GetOwningPlayer(GetTriggerUnit()), rhex(), shex(), g, true)
        call CasterCastAbilityGroup(GetOwningPlayer(GetTriggerUnit()), rstorm(), sstorm(), g, false)
        set i = i + 1
    endloop
    call DestroyGroup(g)                      
    set g = null         
endfunction

//===========================================================================
function InitTrig_Polymorph takes nothing returns nothing
    set Polymorph_Filter = Condition(function Polymorph_NoTrig)
    set gg_trg_Polymorph = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Polymorph, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Polymorph, Condition( function Trig_Polymorph_Conditions ) )
    call TriggerAddAction( gg_trg_Polymorph, function Trig_Polymorph_Actions )
endfunction
//#Polymorph end#


It replaces "u" with GetTriggerUnit()... :)

I hope this helps!
 
Actually, if you're going to use GetTriggerUnit() many times you're better off with a variable. Saves function calls.
 
will be updated IF I will have a chance to, if someone really needs it, then pm me.
-will be updated to non caster system version
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top