Chance to spawn a treant once a tree is chopped down (and some other questions)

Aserpent

New Member
Reaction score
2
I've been asking a lot of questions, generally when my friend can't help me I come here and it's been working well - this one has me stumped.

I have a LARGE volume of trees (2590 to be specific) bunched together in a gigantic mass, what I want to happen is there will be a 2 in 100 chance, that when a tree is cut down, it will create a treant (which would naturally spawn in the nearest playable location to the cut down tree).

A smaller thing I'm wondering about is, how can I make a damage upgrade specifically apply to Attack2? (Solved-ish)

If I have any other related questions, I'll ask them in here:

Another question... How can I make a GUI on map initialization so Player 1 (Red) can choose between two options. Basically, how can I make a GUI with clickable buttons that change variables? (Figured it out)

How can I make an ability that will push others away? E.g a warstomp that will make others fly a short distance away Lots of input, could always use more.

How do I check if a hero unit is of a certain level?
All I can see is a way to check if they've gained a level and if they're a hero, yet no way to verify they are of a certain level.
 

1346610

New Member
Reaction score
6
For the smaller thing you can simply use an orb effect item and change the field to "Enable Attack Index" to 1.
Obviously you will make it an ability.So triggering, you will just add the ability to the unit...
 

Aserpent

New Member
Reaction score
2
For the smaller thing you can simply use an orb effect item and change the field to "Enable Attack Index" to 1.
Obviously you will make it an ability.So triggering, you will just add the ability to the unit...

Thank you - Still need help with the treant random event.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
just make a trigger that sets a variable to a random number between 1 and 100 then if it is below the percent of trigger chance it summons a treant, you can just do this with unit - create 1 treant at position of dying doodad
 

1346610

New Member
Reaction score
6
So you get something like this :

Trigger:
  • Tree Transform chance
    • Events
      • Destructible - A destructible within Rect 000 <gen> dies
    • Conditions
      • (Random integer number between 1 and 100) Less than or equal to (<=) 2
    • Actions
      • Set point = (Position of (Dying destructible))
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
          • Then - Actions
            • Unit - Create 1 Treant for Player 1 (Red) at point facing Default building facing (270.0) degrees
            • Special Effect - Create a special effect at point using Objects\Spawnmodels\NightElf\EntBirthTarget\EntBirthTarget.mdl
            • Special Effect - Destroy (Last created special effect)
          • Else - Actions
      • Custom script: call RemoveLocation(udg_point)


There is the demo map -> View attachment TestTreeTransform.w3x <-
 

Aserpent

New Member
Reaction score
2
Thank you - New question:
How can I make an ability that will push others away? E.g a warstomp that will make others fly a short distance away
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
pushbacks are more complicated, tomorow i will have time to go over it in an edit to this post and pm you when its done, in the mean time can you elaborate? is it like a stomp? a single target ability? an instant push? how far are they going? how long should it take to get there? what direction? just elaborate on every aspect of it you can think of
 

Sim

Forum Administrator
Staff member
Reaction score
534
You need to find some way to knockback a unit and that is quite a complicated task without any JASS knowledge. There are systems which work with GUI but I think it can't knockback more than 1 unit at any time. Not sure though.

In any case, maybe you don't have time to work it out. It will require you a lot of time to import this one though, so maybe you should just work it out somehow.

Anyways, here is my version. It requires a secondary, "dummy" spell in order to work, a lot of systems, tweaking, and is really not customizable. But you asked for it. :p

You need NewGen WE if you want this to work btw, else it won't compile.

JASS:
function Trig_Repel_Init_Actions takes nothing returns boolean
    local unit cast = GetTriggerUnit()
    local unit targ
    local unit u = CreateUnitAtLoc(GetTriggerPlayer(), &#039;h003&#039;, GetUnitLoc(cast), 0.00)
    local location p = GetUnitLoc(u)
    local group g = GetUnitsInRangeOfLocMatching( 612.00, p, null)

    call UnitAddAbility(u, &#039;A036&#039;)
    call UnitApplyTimedLife(u, &#039;BTLF&#039;, 20.00)

    loop
        set targ = FirstOfGroup(g)
        exitwhen targ == null
        call IssueTargetOrder(u, &quot;cripple&quot;, targ)
        call GroupRemoveUnit(g, targ)
    endloop

    call RemoveLocation(p)
    call DestroyGroup(g)

    set u=null
    set cast=null
    set targ=null
    set p=null
    set g=null   
    return false
endfunction

//===========================================================================
function InitTrig_Repel_Init takes nothing returns nothing
    call GT_AddStartsEffectAction(function Trig_Repel_Init_Actions, &#039;A035&#039;)
endfunction


JASS:
scope repel initializer Init

globals
    private constant real period = 0.035
endglobals

private struct data
    unit cast
    unit targ
    integer count = 0
endstruct

private function Knockback takes nothing returns boolean
    local data d = KT_GetData()
    if d.count &gt; 20 then
        set d.cast = null
        set d.targ = null
        call data.destroy(d)
        return true
    endif
    set d.count = d.count + 1
    call SetUnitPositionLoc(d.targ, PolarProjectionBJ(GetUnitLoc(d.cast), DistanceBetweenPoints(GetUnitLoc(d.cast), GetUnitLoc(d.targ))+10., AngleBetweenPoints(GetUnitLoc(d.cast), GetUnitLoc(d.targ))))
    return false
endfunction

private function Execute_Knockback takes nothing returns boolean
    local data d = data.create()

    set d.cast = GetTriggerUnit()
    set d.targ = GetSpellTargetUnit()
    call KT_Add(function Knockback, d, period)

    return false
endfunction

//=====================
private function Init takes nothing returns nothing
    call GT_AddStartsEffectAction(function Execute_Knockback, &#039;A036&#039;)
endfunction

endscope


You also need those 2 systems, which should be copied into empty trigger objects converted into custom text. (Edit --> Convert to Custom Text)

JASS:
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~ KT ~~ Key Timers 2 ~~ By Jesus4Lyf ~~ Version 1.7.2 ~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
//  What is Key Timers?
//         - Key Timers attaches structs to timers, or more to the point timed
//           effects.
//         - You can specify different periods.
//         - Key Timers only uses one timer with one trigger per low period
//           to keep things efficient, especially within the looping.
//         - Key Timers alternatively uses one trigger per instance for all higher
//           periods to allow accurate expirations in a stable and efficient fashion.
//
//    =Pros=
//         - Easy to use.
//         - Fastest attachment loading system (storing in parallel arrays).
//         - Fastest execution system for low periods (all functions on one trigger).
//         - Allows multiple periods to be used.
//         - No H2I. Backwards compatability through patch 1.23 and 1.24.
//
//    =Cons=
//         - The code passed into KT2 must call KT_GetData exactly once.
//         - Periods must be a multiple of 0.00125 seconds. Not 0.007, for example.
//
//    Functions:
//         - KT_Add(userFunc, struct, period)
//         - KT_GetData returns the struct
//
//         - userFunc is to be a user function that takes nothing and returns boolean.
//           It will be executed by the system every period until it returns true.
//
//         - KT_GetData is to be used inside func, it will return the struct passed to
//           to the Add function. It must be called exactly once within the func.
//
//  Details:
//         - KT2 treats low periods and high periods differently, optimizing each
//           with appropriate speed and accuracy, although this effect is invisible
//           to you, the mapper.
//
//         - While func returns false the timer will continue to call it each period.
//           Once func returns true the instance will be detached from system.
//
//  Thanks:
//         - Daxtreme: For encouraging me to return to Key Timers 2, rather than
//           leave it to rot. His interest in the system restored it, and helped
//           it to become what it is now. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile    :)" loading="lazy" data-shortname=":)" />
//
//         - Captain Griffen: For his work on Rapid Timers, demonstrating that it
//           is possible to attach all functions to one trigger, and that it is
//           indeed faster.
//
//         - Cohadar: Told me to make Key Timers without a textmacro.
//           Thanks to him for helping me with the original Key Timers system too.
//           Also, I&#039;d like to thank him for his work on Timer Ticker (TT) which
//           demonstrated how to use triggers/conditions in this sort of system,
//           which has been used in Key Timers 2.
//
//  How to import:
//         - Create a trigger named KT.
//         - Convert it to custom text and replace the whole trigger text with this.
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
library KT initializer Init
    ///////////////
    // Constants //
    ////////////////////////////////////////////////////////////////////////////
    // That bit that users may play with if they know what they&#039;re doing.
    // Not touching these at all is recommended.
    globals
        // Period Threshold is the point at which Key Timers 2 will switch from
        // using the single timer per period mechanism to using TAZO, which is
        // better for higher periods due to the first tick being accurate.
        private constant real PERIODTHRESHOLD=0.3 // MUST be below 10.24 seconds.
        
        // Tazo&#039;s number of precached instances. You can go over this during
        // your map at runtime, but it will probably do some small background
        // processing. Precaching just speeds things up a bit.
        private constant integer TAZO_PRECACHE=64
        
        // Tazo uses the low period part of Key Timers 2 to construct triggers
        // over time when precached ones run out. Here you can set the period used.
        private constant real TAZO_CONSTRUCT_PERIOD=0.03125
    endglobals
    
    //////////////////////////
    // Previous KT2 Globals //
    ////////////////////////////////////////////////////////////////////////////
    // These needed to be moved here for TAZO to hook GetData.
    globals
        private timer array KeyTimer
        private trigger array TimerTrigger
        private integer array KeyTimerListPointer
        private integer array KeyTimerListEndPointer
        private triggercondition array TriggerCond
        private boolexpr array Boolexpr
        private integer array Data
        private integer array Next
        private integer array Prev
        private integer TrigMax=0
        private integer array NextMem
        private integer NextMemMaxPlusOne=1
        private integer array ToAddMem
        private triggercondition array ToRemove
        private boolexpr array ToDestroy
        private boolean array IsAdd
        private integer AddRemoveMax=0
        
        // Locals
        private integer t_id=-1
        private integer t_mem
        private integer t_lastmem
        private integer a_id
        private integer a_mem
        
        // Code Chunks
        private conditionfunc RemoveInstanceCond
    endglobals
    
    //////////////////
    // Previous KT2 //
    ////////////////////////////////////////////////////////////////////////////
    // The KT2 implementation
    private function KeyTimerLoop takes nothing returns nothing
        set t_id=R2I(TimerGetTimeout(GetExpiredTimer())*800)
        set t_mem=KeyTimerListEndPointer[t_id]
        call TriggerEvaluate(TimerTrigger[t_id])
        set t_mem=0
        loop
            exitwhen t_mem==AddRemoveMax
            set t_mem=t_mem+1
            if IsAdd[t_mem] then
                set TriggerCond[ToAddMem[t_mem]]=TriggerAddCondition(TimerTrigger[t_id],Boolexpr[ToAddMem[t_mem]])
            else
                call TriggerRemoveCondition(TimerTrigger[t_id],ToRemove[t_mem])
                call DestroyBoolExpr(ToDestroy[t_mem])
            endif
        endloop
        set AddRemoveMax=0
        set t_id=-1
    endfunction
    
    private function RemoveInstance takes nothing returns boolean
        // Will only fire if code returns true.
        set AddRemoveMax=AddRemoveMax+1
        set IsAdd[AddRemoveMax]=false
        set ToRemove[AddRemoveMax]=TriggerCond[t_lastmem]
        set ToDestroy[AddRemoveMax]=Boolexpr[t_lastmem]
        if Next[t_lastmem]==0 then
            set KeyTimerListEndPointer[t_id]=Prev[t_lastmem]
        endif
        set Prev[Next[t_lastmem]]=Prev[t_lastmem]
        if Prev[t_lastmem]==0 then
            set KeyTimerListPointer[t_id]=Next[t_lastmem]
            if KeyTimerListPointer[t_id]&lt;1 then
                call PauseTimer(KeyTimer[t_id])
            endif
        else
            set Next[Prev[t_lastmem]]=Next[t_lastmem]
        endif
        set NextMem[NextMemMaxPlusOne]=t_lastmem
        set NextMemMaxPlusOne=NextMemMaxPlusOne+1
        return false
    endfunction
    
    private function KTadd takes code func, integer data, real period returns nothing
        set a_id=R2I(period*800)
        
        if KeyTimer[a_id]==null then
            set KeyTimer[a_id]=CreateTimer()
            set TimerTrigger[a_id]=CreateTrigger()
        endif
        
        if NextMemMaxPlusOne==1 then
            set TrigMax=TrigMax+1
            set a_mem=TrigMax
        else
            set NextMemMaxPlusOne=NextMemMaxPlusOne-1
            set a_mem=NextMem[NextMemMaxPlusOne]
        endif
        
        set Boolexpr[a_mem]=And(Condition(func),RemoveInstanceCond)
        if t_id==a_id then
            set AddRemoveMax=AddRemoveMax+1
            set IsAdd[AddRemoveMax]=true
            set ToAddMem[AddRemoveMax]=a_mem
        else
            if KeyTimerListPointer[a_id]&lt;1 then
                call TimerStart(KeyTimer[a_id],a_id/800.0,true,function KeyTimerLoop)
                set KeyTimerListEndPointer[a_id]=a_mem
            endif
            
            set TriggerCond[a_mem]=TriggerAddCondition(TimerTrigger[a_id],Boolexpr[a_mem])
        endif
        set Data[a_mem]=data
        
        set Prev[a_mem]=0
        set Next[a_mem]=KeyTimerListPointer[a_id]
        set Prev[KeyTimerListPointer[a_id]]=a_mem
        set KeyTimerListPointer[a_id]=a_mem
    endfunction
    
    public function GetData takes nothing returns integer // Gets hooked by TAZO.
        set t_lastmem=t_mem
        set t_mem=Prev[t_mem]
        return Data[t_lastmem]
    endfunction
    
    private function KTinit takes nothing returns nothing
        set RemoveInstanceCond=Condition(function RemoveInstance)
    endfunction
    
    //////////
    // TAZO //
    ////////////////////////////////////////////////////////////////////////////
    // KT2 implementation for higher periods (low frequency).
    globals
        private constant integer TAZO_DATAMEM=8190 // Added for KT2 hook. Don&#039;t change.
    endglobals
    
    globals
        private conditionfunc TAZO_LoadDataCond
        private conditionfunc TAZO_RemoveInstanceCond
        
        private timer   array TAZO_TrigTimer
        private integer array TAZO_Data
        private boolexpr array TAZO_Boolexpr
        
        private trigger array TAZO_AvailableTrig
        private integer       TAZO_Max=0
        
        private integer       TAZO_ConstructNext=0
        private trigger array TAZO_ConstructTrig
        private integer array TAZO_ConstructCount
    endglobals
    
    globals//locals
        private integer TAZO_ConKey
    endglobals
    private function TAZO_Constructer takes nothing returns boolean
        set TAZO_ConKey=GetData()
        call TriggerExecute(TAZO_ConstructTrig[TAZO_ConKey])
        set TAZO_ConstructCount[TAZO_ConKey]=TAZO_ConstructCount[TAZO_ConKey]-1
        if TAZO_ConstructCount[TAZO_ConKey]==0 then
            set TAZO_Max=TAZO_Max+1
            set TAZO_AvailableTrig[TAZO_Max]=TAZO_ConstructTrig[TAZO_ConKey]
            set TAZO_TrigTimer[TAZO_ConKey]=CreateTimer()
            call TriggerRegisterTimerExpireEvent(TAZO_AvailableTrig[TAZO_Max],TAZO_TrigTimer[TAZO_ConKey])
            return true
        endif
        return false
    endfunction
    
    globals//locals
        private trigger TAZO_DeadTrig
        private integer TAZO_DeadCount
    endglobals
    private function TAZO_Recycle takes nothing returns boolean
        set TAZO_DeadTrig=GetTriggeringTrigger()
        set TAZO_DeadCount=GetTriggerExecCount(TAZO_DeadTrig)
        call TriggerClearConditions(TAZO_DeadTrig)
        call DestroyBoolExpr(TAZO_Boolexpr[TAZO_DeadCount])
        call PauseTimer(TAZO_TrigTimer[TAZO_DeadCount])
        set TAZO_Max=TAZO_Max+1
        set TAZO_AvailableTrig[TAZO_Max]=TAZO_DeadTrig
        return false
    endfunction
    
    private function TAZO_LoadData takes nothing returns boolean
        // KT2 Data Hook
        set t_mem=TAZO_DATAMEM
        set Data[TAZO_DATAMEM]=TAZO_Data[GetTriggerExecCount(GetTriggeringTrigger())]
        // End KT2 Data Hook
        return false
    endfunction
    
    private function InitTrigExecCount takes trigger t, integer d returns nothing
        if d&gt;128 then
            call InitTrigExecCount.execute(t,d-128)
            set d=128
        endif
        loop
            exitwhen d==0
            set d=d-1
            call TriggerExecute(t)
        endloop
    endfunction
    
    globals//locals
        private integer TAZO_AddKey
        private trigger TAZO_AddTrigger
    endglobals
    public function TAZOadd takes code func, integer data, real period returns nothing
        if TAZO_Max==0 then
            // Failsafe.
            set TAZO_ConstructNext=TAZO_ConstructNext+1
            set TAZO_AddTrigger=CreateTrigger()
            set TAZO_AddKey=TAZO_ConstructNext
            call InitTrigExecCount.execute(TAZO_AddTrigger,TAZO_AddKey)
            set TAZO_TrigTimer[TAZO_AddKey]=CreateTimer()
            call TriggerRegisterTimerExpireEvent(TAZO_AddTrigger,TAZO_TrigTimer[TAZO_AddKey])
        else
            set TAZO_AddTrigger=TAZO_AvailableTrig[TAZO_Max]
            set TAZO_AddKey=GetTriggerExecCount(TAZO_AddTrigger)
            set TAZO_Max=TAZO_Max-1
        endif
        set TAZO_Data[TAZO_AddKey]=data
        set TAZO_Boolexpr[TAZO_AddKey]=And(Condition(func),TAZO_RemoveInstanceCond)
        call TriggerAddCondition(TAZO_AddTrigger,TAZO_LoadDataCond)
        call TriggerAddCondition(TAZO_AddTrigger,TAZO_Boolexpr[TAZO_AddKey])
        call TimerStart(TAZO_TrigTimer[TAZO_AddKey],period,true,null)
        if TAZO_Max&lt;10 then
            set TAZO_ConstructNext=TAZO_ConstructNext+1
            set TAZO_ConstructTrig[TAZO_ConstructNext]=CreateTrigger()
            set TAZO_ConstructCount[TAZO_ConstructNext]=TAZO_ConstructNext
            call KTadd(function TAZO_Constructer,TAZO_ConstructNext,TAZO_CONSTRUCT_PERIOD)
        endif
    endfunction
    
    private function TAZOinit takes nothing returns nothing
        set TAZO_LoadDataCond=Condition(function TAZO_LoadData)
        set TAZO_RemoveInstanceCond=Condition(function TAZO_Recycle)
        // Allow for GetData
        set Next[TAZO_DATAMEM]=TAZO_DATAMEM
        set Prev[TAZO_DATAMEM]=TAZO_DATAMEM
        // End allow for GetData
        loop
            exitwhen TAZO_Max==TAZO_PRECACHE
            set TAZO_ConstructNext=TAZO_ConstructNext+1 // The index.
            set TAZO_Max=TAZO_Max+1 // Will be the same in the initialiser as ConstructNext.
            set TAZO_AvailableTrig[TAZO_Max]=CreateTrigger()
            call InitTrigExecCount.execute(TAZO_AvailableTrig[TAZO_Max],TAZO_ConstructNext)
            set TAZO_TrigTimer[TAZO_ConstructNext]=CreateTimer()
            call TriggerRegisterTimerExpireEvent(TAZO_AvailableTrig[TAZO_Max],TAZO_TrigTimer[TAZO_ConstructNext])
        endloop
    endfunction
    
    ///////////////
    // Interface //
    ////////////////////////////////////////////////////////////////////////////
    // Stitches it all together neatly.
    public function Add takes code func, integer data, real period returns nothing
        if period&lt;PERIODTHRESHOLD then
            call KTadd(func,data,period)
        else
            call TAZOadd(func,data,period)
        endif
    endfunction
    
    private function Init takes nothing returns nothing
        call KTinit()
        call TAZOinit()
    endfunction
endlibrary

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//    End of Key Timers 2
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


JASS:
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~ GT ~~ GTrigger ~~ By Jesus4Lyf ~~ Version 1.05 ~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
//  What is GTrigger?
//               - GTrigger is an event system that replaces the cumbersome WC3
//                 event system.
//               - GTrigger only launches the necessary threads instead of x threads,
//                 where x is the number of times the event type occurs in the map.
//
//      =Pros=
//               - Instead of having 16 events (for &quot;16&quot; players) per use of an,
//                 event type, you have 0 per use and 16 total for that event type.
//               - If you have 100 events of one type in your map, instead of firing
//                 100 triggers each time any spell is cast, you fire only what&#039;s needed.
//               - GTrigger is faster to code with, more efficient to execute, and just
//                 better programming practises and nicer code all round.
//
//      =Cons=
//               - If a trigger with a GTrigger event is destroyed, it must have its
//                 event unregistered first or it will leak an event (slows firing down).
//               - Shouldn&#039;t use &quot;wait&quot; actions anywhere in the triggers.
//
//      Functions:
//                 // General
//               - GT_UnregisterTriggeringEvent()
//
//                 // Ability events
//               - GT_RegisterStartsEffectEvent(trigger, abilityid)       (returns the trigger passed in)
//               - GT_RegisterBeginsChanellingEvent(trigger, abilityid)   (returns the trigger passed in)
//               - GT_RegisterBeginsCastingEvent(trigger, abilityid)      (returns the trigger passed in)
//               - GT_RegisterStopsCastingEvent(trigger, abilityid)       (returns the trigger passed in)
//               - GT_RegisterFinishesCastingEvent(trigger, abilityid)    (returns the trigger passed in)
//               - GT_RegisterLearnsAbilityEvent(trigger, abilityid)       (returns the trigger passed in)
//                 // Order events // (can use String2OrderIdBJ(&quot;OrderString&quot;) for orderid
//               - GT_RegisterTargetOrderEvent(trigger, orderid)          (returns the trigger passed in)
//               - GT_RegisterPointOrderEvent(trigger, orderid)           (returns the trigger passed in)
//               - GT_RegisterNoTargetOrderEvent(trigger, orderid)        (returns the trigger passed in)
//                 // Item events
//               - GT_RegisterItemUsedEvent(trigger, itemtypeid)          (returns the trigger passed in)
//               - GT_RegisterItemAcquiredEvent(trigger, itemtypeid)      (returns the trigger passed in)
//               - GT_RegisterItemDroppedEvent(trigger, itemtypeid)       (returns the trigger passed in)
//                 // Unit events
//               - GT_RegisterUnitDiesEvent(trigger, unittypeid)          (returns the trigger passed in)
//
//                 // Ability Events
//               - GT_UnregisterSpellEffectEvent(trigger, abilityid)      (returns the trigger passed in)
//               - GT_UnregisterBeginsChanellingEvent(trigger, abilityid) (returns the trigger passed in)
//               - GT_UnregisterBeginsCastingEvent(trigger, abilityid)    (returns the trigger passed in)
//               - GT_UnregisterStopsCastingEvent(trigger, abilityid)     (returns the trigger passed in)
//               - GT_UnregisterFinishesCastingEvent(trigger, abilityid)  (returns the trigger passed in)
//               - GT_UnregisterLearnsAbilityEvent(trigger, abilityid)     (returns the trigger passed in)
//                 // Order events // (can use String2OrderIdBJ(&quot;OrderString&quot;) for orderid
//               - GT_UnregisterTargetOrderEvent(trigger, orderid)        (returns the trigger passed in)
//               - GT_UnregisterPointOrderEvent(trigger, orderid)         (returns the trigger passed in)
//               - GT_UnregisterNoTargetOrderEvent(trigger, orderid)      (returns the trigger passed in)
//                 // Item events
//               - GT_UnregisterItemUsedEvent(trigger, itemtypeid)        (returns the trigger passed in)
//               - GT_UnregisterItemAcquiredEvent(trigger, itemtypeid)    (returns the trigger passed in)
//               - GT_UnregisterItemDroppedEvent(trigger, itemtypeid)     (returns the trigger passed in)
//                 // Unit events
//               - GT_UnregisterUnitDiesEvent(trigger, unittypeid)        (returns the trigger passed in)
//
//      Alternative interface (not recommended):
//              If you aren&#039;t familiar with how this works, you shouldn&#039;t use it.
//              All funcs must return false. (That is the only reason it isn&#039;t recommended.)
//                 // General
//               - GT_RemoveTriggeringAction() // Use this to remove actions.
//                 // Ability Events
//               - GT_AddStartsEffectAction(func, abilityid)
//               - GT_AddBeginsChanellingActon(func, abilityid)
//               - GT_AddBeginsCastingAction(func, abilityid)
//               - GT_AddStopsCastingAction(func, abilityid)
//               - GT_AddFinishesCastingAction(func, abilityid)
//               - GT_AddLearnsAbilityAction(func, abilityid)
//                 // Order events // (can use String2OrderIdBJ(&quot;OrderString&quot;) for orderid
//               - GT_AddTargetOrderAction(func, orderid)
//               - GT_AddPointOrderAction(func, orderid)
//               - GT_AddNoTargetOrderAction(func, orderid)
//                 // Item events
//               - GT_AddItemUsedAction(func, itemtypeid)
//               - GT_AddItemAcquiredAction(func, itemtypeid)
//               - GT_AddItemDroppedAction(func, itemtypeid)
//                 // Unit events
//               - GT_AddUnitDiesAction(func, unittypeid)
//
//  Details:
//               - Due to the storage method, only 8191 GTrigger events are possible at any one time.
//
//  Thanks:
//               - Daxtreme: For voluntarily testing this system and the UnitDies event idea.
//               - kenny!: For the Order and Learns Ability event ideas.
//
//  How to import:
//               - Create a trigger named GT.
//               - Convert it to custom text and replace the whole trigger text with this.
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
library GT initializer Init
    //////////////
    // Pointers //
    ////////////////////////////////////////////////////////////////////////////
    // Assigned to abilities, and point to trigger grouping linked lists.
    //
    // Use:
    //  GetPointer --&gt; int (pointer)
    //  FreePointer(int (pointer))
    //  set PointerTarget[int (pointer)]=int (list link)
    //  PointerTarget[int (pointer)] --&gt; int (list link)
    globals
        // Pointer
        private integer array PointerTarget
        private integer PointerMax=0
        // Spare Pointer Stack
        private integer array NextPointer
        private integer NextPointerMaxPlusOne=1
    endglobals
    
    private function GetPointer takes nothing returns integer
        if NextPointerMaxPlusOne==1 then
            set PointerMax=PointerMax+1
            return PointerMax
        endif
        set NextPointerMaxPlusOne=NextPointerMaxPlusOne-1
        return NextPointer[NextPointerMaxPlusOne]
    endfunction
    private function FreePointer takes integer pointer returns nothing
        set PointerTarget[pointer]=0
        set NextPointer[NextPointerMaxPlusOne]=pointer
        set NextPointerMaxPlusOne=NextPointerMaxPlusOne+1
    endfunction
    
    ///////////////////////////////////
    // Trigger Grouping Linked Lists //
    ////////////////////////////////////////////////////////////////////////////
    // Contains a chain of triggers to be executed together.
    //
    // Use:
    //  GetMem() --&gt; int (mem)
    //  FreeMem(int (mem))
    //  Link(int (pointer), int (mem))
    //  Unlink(int (pointer), int (mem))
    globals
        // Spare Link Stack
        private integer array NextMem
        private integer NextMemMaxPlusOne=1
        // Linked list
        private trigger array Trig
        private integer array Next
        private integer array Prev
        private integer TrigMax=0
    endglobals
    
    private function GetMem takes nothing returns integer
        if NextMemMaxPlusOne==1 then
            set TrigMax=TrigMax+1
            return TrigMax
        endif
        set NextMemMaxPlusOne=NextMemMaxPlusOne-1
        return NextMem[NextMemMaxPlusOne]
    endfunction
    private function FreeMem takes integer i returns nothing
        set Trig<i>=null
        set NextMem[NextMemMaxPlusOne]=i
        set NextMemMaxPlusOne=NextMemMaxPlusOne+1
    endfunction
    
    // Linked list functionality
    // NOTE: This means &quot;Next&quot; must be loaded BEFORE executing the trigger, which could delete the current link.
    private function Link takes integer pointer, integer new returns nothing
        set Prev[new]=0
        set Next[new]=PointerTarget[pointer]
        set Prev[PointerTarget[pointer]]=new
        set PointerTarget[pointer]=new
    endfunction
    private function Unlink takes integer pointer, integer rem returns nothing
        if Prev[rem]==0 then
            set PointerTarget[pointer]=Next[rem]
            set Prev[Next[rem]]=0
        endif
        set Next[Prev[rem]]=Next[rem]
        set Prev[Next[rem]]=Prev[rem]
    endfunction
    
    //////////////////////
    // GTrigger General //
    ////////////////////////////////////////////////////////////////////////////
    // Only contains the UnregisterTriggeringEvent action for public use.
    globals
        boolean UnregisterLastEvent=false
    endglobals
    public function UnregisterTriggeringEvent takes nothing returns nothing
        set UnregisterLastEvent=true
    endfunction
    
    /////////////////////////////////////
    // GTrigger Ability Implementation //
    ////////////////////////////////////////////////////////////////////////////
    // The nasty textmacro implementation of special &quot;All Players&quot; events.
    //! textmacro SetupSpecialAllPlayersEvent takes NAME, EVENT, GETSPECIAL
        globals
            private trigger $NAME$Trigger=CreateTrigger()
            // Extendable arrays
            private integer array $NAME$AbilityIdA
            private integer array $NAME$ListPointerA
            private integer array $NAME$AbilityIdB
            private integer array $NAME$ListPointerB
            private integer array $NAME$AbilityIdC
            private integer array $NAME$ListPointerC
            private integer array $NAME$AbilityIdD
            private integer array $NAME$ListPointerD
            private integer array $NAME$AbilityIdE
            private integer array $NAME$ListPointerE
        endglobals
        
        globals//locals
            private integer GetOrCreateListPointer$NAME$AbilHashed
        endglobals
        private function GetOrCreate$NAME$ListPointer takes integer abil returns integer
            set GetOrCreateListPointer$NAME$AbilHashed=abil-(abil/8191)*8191
            if $NAME$AbilityIdA[GetOrCreateListPointer$NAME$AbilHashed]==abil then // Correct
                return $NAME$ListPointerA[GetOrCreateListPointer$NAME$AbilHashed]
            elseif $NAME$AbilityIdA[GetOrCreateListPointer$NAME$AbilHashed]&lt;1 then // Empty
                set $NAME$AbilityIdA[GetOrCreateListPointer$NAME$AbilHashed]=abil
                set $NAME$ListPointerA[GetOrCreateListPointer$NAME$AbilHashed]=GetPointer()
                return $NAME$ListPointerA[GetOrCreateListPointer$NAME$AbilHashed]
            endif
            if $NAME$AbilityIdB[GetOrCreateListPointer$NAME$AbilHashed]==abil then // Correct
                return $NAME$ListPointerB[GetOrCreateListPointer$NAME$AbilHashed]
            elseif $NAME$AbilityIdB[GetOrCreateListPointer$NAME$AbilHashed]&lt;1 then // Empty
                set $NAME$AbilityIdB[GetOrCreateListPointer$NAME$AbilHashed]=abil
                set $NAME$ListPointerB[GetOrCreateListPointer$NAME$AbilHashed]=GetPointer()
                return $NAME$ListPointerB[GetOrCreateListPointer$NAME$AbilHashed]
            endif
            if $NAME$AbilityIdC[GetOrCreateListPointer$NAME$AbilHashed]==abil then // Correct
                return $NAME$ListPointerC[GetOrCreateListPointer$NAME$AbilHashed]
            elseif $NAME$AbilityIdC[GetOrCreateListPointer$NAME$AbilHashed]&lt;1 then // Empty
                set $NAME$AbilityIdC[GetOrCreateListPointer$NAME$AbilHashed]=abil
                set $NAME$ListPointerC[GetOrCreateListPointer$NAME$AbilHashed]=GetPointer()
                return $NAME$ListPointerC[GetOrCreateListPointer$NAME$AbilHashed]
            endif
            if $NAME$AbilityIdD[GetOrCreateListPointer$NAME$AbilHashed]==abil then // Correct
                return $NAME$ListPointerD[GetOrCreateListPointer$NAME$AbilHashed]
            elseif $NAME$AbilityIdD[GetOrCreateListPointer$NAME$AbilHashed]&lt;1 then // Empty
                set $NAME$AbilityIdD[GetOrCreateListPointer$NAME$AbilHashed]=abil
                set $NAME$ListPointerD[GetOrCreateListPointer$NAME$AbilHashed]=GetPointer()
                return $NAME$ListPointerD[GetOrCreateListPointer$NAME$AbilHashed]
            endif
            if $NAME$AbilityIdE[GetOrCreateListPointer$NAME$AbilHashed]==abil then // Correct
                return $NAME$ListPointerE[GetOrCreateListPointer$NAME$AbilHashed]
            elseif $NAME$AbilityIdE[GetOrCreateListPointer$NAME$AbilHashed]&lt;1 then // Empty
                set $NAME$AbilityIdE[GetOrCreateListPointer$NAME$AbilHashed]=abil
                set $NAME$ListPointerE[GetOrCreateListPointer$NAME$AbilHashed]=GetPointer()
                return $NAME$ListPointerE[GetOrCreateListPointer$NAME$AbilHashed]
            endif
            call BJDebugMsg(&quot;GTrigger Error: Ran out of storage locations for pointers on object &quot;+GetObjectName(abil)+&quot;!&quot;)
            set PointerTarget[0]=0
            return 0
        endfunction
        
        globals//locals
            private integer GetListPointer$NAME$AbilHashed
        endglobals
        private function Get$NAME$ListPointer takes integer abil returns integer
            set GetListPointer$NAME$AbilHashed=abil-(abil/8191)*8191
            if $NAME$AbilityIdA[GetListPointer$NAME$AbilHashed]==abil then // Correct
                return $NAME$ListPointerA[GetListPointer$NAME$AbilHashed]
            elseif $NAME$AbilityIdA[GetListPointer$NAME$AbilHashed]&lt;1 then // Empty
                set PointerTarget[0]=0 // Make sure.
                return 0
            endif
            if $NAME$AbilityIdB[GetListPointer$NAME$AbilHashed]==abil then // Correct
                return $NAME$ListPointerB[GetListPointer$NAME$AbilHashed]
            elseif $NAME$AbilityIdB[GetListPointer$NAME$AbilHashed]&lt;1 then // Empty
                set PointerTarget[0]=0 // Make sure.
                return 0
            endif
            if $NAME$AbilityIdC[GetListPointer$NAME$AbilHashed]==abil then // Correct
                return $NAME$ListPointerC[GetListPointer$NAME$AbilHashed]
            elseif $NAME$AbilityIdC[GetListPointer$NAME$AbilHashed]&lt;1 then // Empty
                set PointerTarget[0]=0 // Make sure.
                return 0
            endif
            if $NAME$AbilityIdD[GetListPointer$NAME$AbilHashed]==abil then // Correct
                return $NAME$ListPointerD[GetListPointer$NAME$AbilHashed]
            elseif $NAME$AbilityIdD[GetListPointer$NAME$AbilHashed]&lt;1 then // Empty
                set PointerTarget[0]=0 // Make sure.
                return 0
            endif
            if $NAME$AbilityIdE[GetListPointer$NAME$AbilHashed]==abil then // Correct
                return $NAME$ListPointerE[GetListPointer$NAME$AbilHashed]
            elseif $NAME$AbilityIdE[GetListPointer$NAME$AbilHashed]&lt;1 then // Empty
                set PointerTarget[0]=0 // Make sure.
                return 0
            endif
            call BJDebugMsg(&quot;GTrigger Error: Ran out of storage locations for pointers at ability &quot;+GetObjectName(abil)+&quot;!&quot;)
            set PointerTarget[0]=0
            return 0
        endfunction
        
        globals//locals
            private integer Register$NAME$Mem
        endglobals
        public function Register$NAME$Event takes trigger t, integer abil returns trigger
            set Register$NAME$Mem=GetMem()
            set Trig[Register$NAME$Mem]=t
            call Link(GetOrCreate$NAME$ListPointer(abil),Register$NAME$Mem)
            return t
        endfunction
        
        globals//locals
            private integer Unregister$NAME$Pointer
            private integer Unregister$NAME$Mem
        endglobals
        public function Unregister$NAME$Event takes trigger t, integer abil returns trigger
            set Unregister$NAME$Pointer=Get$NAME$ListPointer(abil)
            set Unregister$NAME$Mem=PointerTarget[Unregister$NAME$Pointer]
            loop
                exitwhen Trig[Unregister$NAME$Mem]==t
                if Unregister$NAME$Mem==0 then
                    return t // Not found.
                endif
                set Unregister$NAME$Mem=Next[Unregister$NAME$Mem]
            endloop
            call Unlink(Unregister$NAME$Pointer,Unregister$NAME$Mem)
            call FreeMem(Unregister$NAME$Mem)
            return t
        endfunction
        
        private function Trigger$NAME$Event takes nothing returns boolean
            local integer Trigger$NAME$Pointer=Get$NAME$ListPointer($GETSPECIAL$)
            local integer Trigger$NAME$Mem=PointerTarget[Trigger$NAME$Pointer]
            local integer Trigger$NAME$NextMem
            set UnregisterLastEvent=false
            loop
                exitwhen Trigger$NAME$Mem&lt;1
                set Trigger$NAME$NextMem=Next[Trigger$NAME$Mem]
                if TriggerEvaluate(Trig[Trigger$NAME$Mem]) then
                    call TriggerExecute(Trig[Trigger$NAME$Mem])
                endif
                if UnregisterLastEvent then
                    set UnregisterLastEvent=false
                    call Unlink(Trigger$NAME$Pointer,Trigger$NAME$Mem)
                    call FreeMem(Trigger$NAME$Mem)
                endif
                set Trigger$NAME$Mem=Trigger$NAME$NextMem
            endloop
            return false
        endfunction
        
        private function Init$NAME$ takes nothing returns nothing
            local integer i=bj_MAX_PLAYER_SLOTS
            call TriggerAddCondition($NAME$Trigger,Condition(function Trigger$NAME$Event))
            loop
                set i=i-1
                call TriggerRegisterPlayerUnitEvent($NAME$Trigger,Player(i),EVENT_PLAYER_$EVENT$,null)
                exitwhen i==0
            endloop
        endfunction
    //! endtextmacro
    
    //! runtextmacro SetupSpecialAllPlayersEvent(&quot;StartsEffect&quot;,     &quot;UNIT_SPELL_EFFECT&quot;,        &quot;GetSpellAbilityId()&quot;)
    //! runtextmacro SetupSpecialAllPlayersEvent(&quot;BeginsChanelling&quot;, &quot;UNIT_SPELL_CHANNEL&quot;,       &quot;GetSpellAbilityId()&quot;)
    //! runtextmacro SetupSpecialAllPlayersEvent(&quot;BeginsCasting&quot;,    &quot;UNIT_SPELL_CAST&quot;,          &quot;GetSpellAbilityId()&quot;)
    //! runtextmacro SetupSpecialAllPlayersEvent(&quot;StopsCasting&quot;,     &quot;UNIT_SPELL_ENDCAST&quot;,       &quot;GetSpellAbilityId()&quot;)
    //! runtextmacro SetupSpecialAllPlayersEvent(&quot;FinishesCasting&quot;,  &quot;UNIT_SPELL_FINISH&quot;,        &quot;GetSpellAbilityId()&quot;)
    //! runtextmacro SetupSpecialAllPlayersEvent(&quot;TargetOrder&quot;,      &quot;UNIT_ISSUED_TARGET_ORDER&quot;, &quot;GetIssuedOrderId()&quot;)
    //! runtextmacro SetupSpecialAllPlayersEvent(&quot;PointOrder&quot;,       &quot;UNIT_ISSUED_POINT_ORDER&quot;,  &quot;GetIssuedOrderId()&quot;)
    //! runtextmacro SetupSpecialAllPlayersEvent(&quot;NoTargetOrder&quot;,    &quot;UNIT_ISSUED_ORDER&quot;,        &quot;GetIssuedOrderId()&quot;)
    //! runtextmacro SetupSpecialAllPlayersEvent(&quot;ItemUsed&quot;,         &quot;UNIT_USE_ITEM&quot;,            &quot;GetItemTypeId(GetManipulatedItem())&quot;)
    //! runtextmacro SetupSpecialAllPlayersEvent(&quot;ItemAcquired&quot;,     &quot;UNIT_PICKUP_ITEM&quot;,         &quot;GetItemTypeId(GetManipulatedItem())&quot;)
    //! runtextmacro SetupSpecialAllPlayersEvent(&quot;ItemDropped&quot;,      &quot;UNIT_DROP_ITEM&quot;,           &quot;GetItemTypeId(GetManipulatedItem())&quot;)
    //! runtextmacro SetupSpecialAllPlayersEvent(&quot;UnitDies&quot;,         &quot;UNIT_DEATH&quot;,               &quot;GetUnitTypeId(GetTriggerUnit())&quot;)
    //! runtextmacro SetupSpecialAllPlayersEvent(&quot;LearnsAbility&quot;,    &quot;HERO_SKILL&quot;,               &quot;GetLearnedSkill()&quot;)
    // Note to self: Remember to update the Init function.
    
    /////////////////////////////////////////
    // GTrigger All Players Implementation //
    ////////////////////////////////////////////////////////////////////////////
    // The textmacro implementation of other &quot;All Players&quot; events.
    //! textmacro SetupAllPlayersEvent takes NAME, EVENT
        globals
            private trigger $NAME$Trigger=CreateTrigger()
            private integer $NAME$ListPointer=0
        endglobals
        
        globals//locals
            private integer Register$NAME$Mem
        endglobals
        public function Register$NAME$Event takes trigger t returns trigger
            set Register$NAME$Mem=GetMem()
            set Trig[Register$NAME$Mem]=t
            call Link($NAME$ListPointer,Register$NAME$Mem)
            return t
        endfunction
        
        globals//locals
            private integer Unregister$NAME$Pointer
            private integer Unregister$NAME$Mem
        endglobals
        public function Unregister$NAME$Event takes trigger t returns trigger
            set Unregister$NAME$Mem=PointerTarget[$NAME$ListPointer]
            loop
                exitwhen Trig[Unregister$NAME$Mem]==t
                if Unregister$NAME$Mem==0 then
                    return t // Not found.
                endif
                set Unregister$NAME$Mem=Next[Unregister$NAME$Mem]
            endloop
            call Unlink($NAME$ListPointer,Unregister$NAME$Mem)
            call FreeMem(Unregister$NAME$Mem)
            return t
        endfunction
        
        private function Trigger$NAME$Event takes nothing returns boolean
            local integer Trigger$NAME$Mem=PointerTarget[$NAME$ListPointer]
            local integer Trigger$NAME$NextMem
            set UnregisterLastEvent=false
            loop
                exitwhen Trigger$NAME$Mem&lt;1
                set Trigger$NAME$NextMem=Next[Trigger$NAME$Mem]
                if TriggerEvaluate(Trig[Trigger$NAME$Mem]) then
                    call TriggerExecute(Trig[Trigger$NAME$Mem])
                endif
                if UnregisterLastEvent then
                    set UnregisterLastEvent=false
                    call Unlink($NAME$ListPointer,Trigger$NAME$Mem)
                    call FreeMem(Trigger$NAME$Mem)
                endif
                set Trigger$NAME$Mem=Trigger$NAME$NextMem
            endloop
            return false
        endfunction
        
        private function Init$NAME$ takes nothing returns nothing
            local integer i=bj_MAX_PLAYER_SLOTS
            call TriggerAddCondition($NAME$Trigger,Condition(function Trigger$NAME$Event))
            loop
                set i=i-1
                call TriggerRegisterPlayerUnitEvent($NAME$Trigger,Player(i),EVENT_PLAYER_UNIT_$EVENT$,null)
                exitwhen i==0
            endloop
            // Initialise the pointer.
            set $NAME$ListPointer=GetPointer()
        endfunction
    //! endtextmacro
    
    // Old: //! runtextmacro SetupAllPlayersEvent(&quot;AnyUnitDies&quot;, &quot;DEATH&quot;)
    
    private function Init takes nothing returns nothing
        // Ability events
        call InitStartsEffect()
        call InitBeginsChanelling()
        call InitBeginsCasting()
        call InitStopsCasting()
        call InitFinishesCasting()
        call InitLearnsAbility()
        // Order events
        call InitTargetOrder()
        call InitPointOrder()
        call InitNoTargetOrder()
        // Item events
        call InitItemUsed()
        call InitItemAcquired()
        call InitItemDropped()
        // Unit events
        call InitUnitDies()
    endfunction
    
    //////////////
    // Wrappers //
    ////////////////////////////////////////////////////////////////////////////
    // Wraps it up, for those who really want this interface.
    
    // General
    public function RemoveTriggeringAction takes nothing returns nothing
        call UnregisterTriggeringEvent()
        call DestroyTrigger(GetTriggeringTrigger())
    endfunction
    
    // Special All Player Events
    //! textmacro AddSpecialAllPlayersWrapper takes EVENT
        public function Add$EVENT$Action takes code func, integer special returns nothing
            call TriggerAddCondition(Register$EVENT$Event(CreateTrigger(),special),Condition(func))
        endfunction
    //! endtextmacro
    //! runtextmacro AddSpecialAllPlayersWrapper(&quot;StartsEffect&quot;)
    //! runtextmacro AddSpecialAllPlayersWrapper(&quot;BeginsChanelling&quot;)
    //! runtextmacro AddSpecialAllPlayersWrapper(&quot;BeginsCasting&quot;)
    //! runtextmacro AddSpecialAllPlayersWrapper(&quot;StopsCasting&quot;)
    //! runtextmacro AddSpecialAllPlayersWrapper(&quot;FinishesCasting&quot;)
    //! runtextmacro AddSpecialAllPlayersWrapper(&quot;TargetOrder&quot;)
    //! runtextmacro AddSpecialAllPlayersWrapper(&quot;PointOrder&quot;)
    //! runtextmacro AddSpecialAllPlayersWrapper(&quot;NoTargetOrder&quot;)
    //! runtextmacro AddSpecialAllPlayersWrapper(&quot;ItemUsed&quot;)
    //! runtextmacro AddSpecialAllPlayersWrapper(&quot;ItemAcquired&quot;)
    //! runtextmacro AddSpecialAllPlayersWrapper(&quot;ItemDropped&quot;)
    //! runtextmacro AddSpecialAllPlayersWrapper(&quot;UnitDies&quot;)
    //! runtextmacro AddSpecialAllPlayersWrapper(&quot;LearnsAbility&quot;)
    // Note to self: Remember to update the Init function.
    
    // All Player Events
    //! textmacro AddAllPlayersWrapper takes EVENT
        public function Add$EVENT$Action takes code func returns nothing
            call TriggerAddCondition(Register$EVENT$Event(CreateTrigger()),Condition(func))
        endfunction
    //! endtextmacro
    // Old: //! runtextmacro AddAllPlayersWrapper(&quot;AnyUnitDies&quot;)
endlibrary
</i>


Just copy everything into your map, make the 4 necessary trigger objects (CTRL-T), and replace the following instances with the ones in your map. To get the raw code of something in the object editor, press CTRL-D.

'h003' should be replaced with your dummy unit's raw code. More on Dummy Units
'A035' should be replaced with the raw code of your main spell, the one the unit actually casts.
'A036' should be replaced with the dummy "Repel" ability, based off Cripple and doing whatever you want it to do. Simply make a new custom ability, use Cripple as base, and change whatever you need.

So yeah, you have a lot of work in your hands. Keep in mind that this spell I made like 3 years ago so yeah it's kinda old.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
^That was nothing but a huge wall of mainly incomprehensible text to me.

Try here. Simple lesson on sliding. After that, pick all units around caster and slide them.
 

1346610

New Member
Reaction score
6
Nevermind. Try this professional trigger that can easly be edited...

Trigger:
  • Cast A Knockback
    • Events
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (KBA_TargetUnit is in KB_KnockbackedUnits) Equal to (==) True
        • Then - Actions
          • Unit Group - Remove KBA_TargetUnit from KB_KnockbackedUnits
          • Set KB_CountBuffs = (KB_CountBuffs - 1)
            • Do Multiple ActionsFor each (Integer KB_GeneralIntegers[2]) from 1 to KB_TotalKnockUnits, do (Actions)
              • Loop - Actions
                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • KB_Units[KB_GeneralIntegers[1]] Equal to (==) KBA_TargetUnit
                  • Then - Actions
                    • Set KB_GeneralIntegers[1] = KB_GeneralIntegers[2]
                    • Set KB_GeneralIntegers[2] = KB_TotalKnockUnits
                  • Else - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • KB_TotalKnockUnits Greater than (&gt;) KB_GeneralIntegers[1]
              • Then - Actions
                • Set KB_Levels[KB_GeneralIntegers[1]] = KB_Levels[KB_TotalKnockUnits]
                • Set KB_Units[KB_GeneralIntegers[1]] = KB_Units[KB_TotalKnockUnits]
                • Set KB_Angle[KB_GeneralIntegers[1]] = KB_Angle[KB_TotalKnockUnits]
                • Set KB_MaxDistance[KB_GeneralIntegers[1]] = KB_MaxDistance[KB_TotalKnockUnits]
                • Set KB_ReachedDistance[KB_GeneralIntegers[1]] = KB_ReachedDistance[KB_TotalKnockUnits]
                • Set KB_ReduceSpeedReal[KB_GeneralIntegers[1]] = KB_ReduceSpeedReal[KB_TotalKnockUnits]
                • Set KB_SpecificSpeed[KB_GeneralIntegers[1]] = KB_SpecificSpeed[KB_TotalKnockUnits]
                • Set KB_Effects_1[KB_GeneralIntegers[1]] = KB_Effects_1[KB_TotalKnockUnits]
                • Set KB_Effects_2[KB_GeneralIntegers[1]] = KB_Effects_2[KB_TotalKnockUnits]
                • Set KB_DestroyTrees[KB_GeneralIntegers[1]] = KB_DestroyTrees[KB_TotalKnockUnits]
                • Set KB_EffectCounter[KB_GeneralIntegers[1]] = KB_EffectCounter[KB_TotalKnockUnits]
                • Set KB_EffectCounter2[KB_GeneralIntegers[1]] = KB_EffectCounter2[KB_TotalKnockUnits]
                • Set KB_GeneralIntegers[1] = (KB_GeneralIntegers[1] - 1)
              • Else - Actions
          • Set KB_Units[KB_TotalKnockUnits] = No unit
          • Set KB_TotalKnockUnits = (KB_TotalKnockUnits - 1)
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • KB_CountBuffs Equal to (==) 0
              • Then - Actions
                • Set KB_TotalKnockUnits = 0
                • Trigger - Turn off Get Knockback 1 &lt;gen&gt;
              • Else - Actions
        • Else - Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KB_CountBuffs Equal to (==) 0
        • Then - Actions
          • Trigger - Turn on Get Knockback 1 &lt;gen&gt;
        • Else - Actions
      • Set KB_CountBuffs = (KB_CountBuffs + 1)
      • Set KB_TotalKnockUnits = (KB_TotalKnockUnits + 1)
      • Set KB_Casters[KB_TotalKnockUnits] = KBA_Caster
      • Set KB_Levels[KB_TotalKnockUnits] = KBA_Level
      • Set KB_Units[KB_TotalKnockUnits] = KBA_TargetUnit
      • Set KB_StartPositions[KB_TotalKnockUnits] = KBA_StartingPosition
      • Set KB_TempPoint[KB_TotalKnockUnits] = (Position of KBA_TargetUnit)
      • Set KB_Angle[KB_TotalKnockUnits] = (Angle from KB_StartPositions[KB_TotalKnockUnits] to KB_TempPoint[KB_TotalKnockUnits])
      • Set KB_MaxDistance[KB_TotalKnockUnits] = (KBA_DistancePerLevel x (Real(KBA_Level)))
      • Set KB_ReachedDistance[KB_TotalKnockUnits] = 0.00
      • Set KB_ReduceSpeedReal[KB_GeneralIntegers[1]] = 0.00
      • Set KB_SpecificSpeed[KB_TotalKnockUnits] = KBA_Speed
      • Set KB_Effects_1[KB_TotalKnockUnits] = KBA_SpecialEffects[1]
      • Set KB_Effects_2[KB_TotalKnockUnits] = KBA_SpecialEffects[2]
      • Set KB_DestroyTrees[KB_TotalKnockUnits] = KBA_DestroyTrees
      • Set KB_EffectCounter[KB_GeneralIntegers[1]] = 0
      • Set KB_EffectCounter2[KB_GeneralIntegers[1]] = 0
      • Unit Group - Add KBA_TargetUnit to KB_KnockbackedUnits
      • Custom script: call RemoveLocation (udg_KBA_StartingPosition)
      • Custom script: call RemoveLocation (udg_KB_TempPoint [udg_KB_TotalKnockUnits] )
      • Custom script: call RemoveLocation (udg_KB_StartPositions [udg_KB_TotalKnockUnits] )


Trigger:
  • Get Knockback 1
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer KB_GeneralIntegers[1]) from 1 to KB_TotalKnockUnits, do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (KB_Units[KB_GeneralIntegers[1]] is in KB_KnockbackedUnits) Equal to (==) True
            • Then - Actions
              • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KB_ReachedDistance[KB_GeneralIntegers[1]] Greater than or equal to (&gt;=) KB_MaxDistance[KB_GeneralIntegers[1]]
                • Then - Actions
                  • Unit Group - Remove KB_Units[KB_GeneralIntegers[1]] from KB_KnockbackedUnits
                  • Set KB_CountBuffs = (KB_CountBuffs - 1)
                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • KB_TotalKnockUnits Greater than (&gt;) KB_GeneralIntegers[1]
                      • Then - Actions
                        • Set KB_Levels[KB_GeneralIntegers[1]] = KB_Levels[KB_TotalKnockUnits]
                        • Set KB_Units[KB_GeneralIntegers[1]] = KB_Units[KB_TotalKnockUnits]
                        • Set KB_Angle[KB_GeneralIntegers[1]] = KB_Angle[KB_TotalKnockUnits]
                        • Set KB_MaxDistance[KB_GeneralIntegers[1]] = KB_MaxDistance[KB_TotalKnockUnits]
                        • Set KB_ReachedDistance[KB_GeneralIntegers[1]] = KB_ReachedDistance[KB_TotalKnockUnits]
                        • Set KB_ReduceSpeedReal[KB_GeneralIntegers[1]] = KB_ReduceSpeedReal[KB_TotalKnockUnits]
                        • Set KB_SpecificSpeed[KB_GeneralIntegers[1]] = KB_SpecificSpeed[KB_TotalKnockUnits]
                        • Set KB_Effects_1[KB_GeneralIntegers[1]] = KB_Effects_1[KB_TotalKnockUnits]
                        • Set KB_Effects_2[KB_GeneralIntegers[1]] = KB_Effects_2[KB_TotalKnockUnits]
                        • Set KB_DestroyTrees[KB_GeneralIntegers[1]] = KB_DestroyTrees[KB_TotalKnockUnits]
                        • Set KB_EffectCounter[KB_GeneralIntegers[1]] = KB_EffectCounter[KB_TotalKnockUnits]
                        • Set KB_EffectCounter2[KB_GeneralIntegers[1]] = KB_EffectCounter2[KB_TotalKnockUnits]
                        • Set KB_GeneralIntegers[1] = (KB_GeneralIntegers[1] - 1)
                      • Else - Actions
                  • Set KB_Units[KB_TotalKnockUnits] = No unit
                  • Set KB_TotalKnockUnits = (KB_TotalKnockUnits - 1)
                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • KB_CountBuffs Equal to (==) 0
                      • Then - Actions
                        • Set KB_TotalKnockUnits = 0
                        • Trigger - Turn off (This trigger)
                      • Else - Actions
                • Else - Actions
                  • Set KB_ReducedReal = ((KB_SpecificSpeed[KB_GeneralIntegers[1]] / KB_MaxDistance[KB_GeneralIntegers[1]]) x KB_ReachedDistance[KB_GeneralIntegers[1]])
                  • Set KB_ReduceSpeedReal[KB_GeneralIntegers[1]] = (KB_ReducedReal - (KB_ReduceSpeedReal[KB_GeneralIntegers[1]] x 0.10))
                  • Set KB_TempReal = ((KB_SpecificSpeed[KB_GeneralIntegers[1]] - KB_ReduceSpeedReal[KB_GeneralIntegers[1]]) x 2.00)
                  • Set KB_TempPoint[1] = (Position of KB_Units[KB_GeneralIntegers[1]])
                  • Set KB_TempPoint[2] = (KB_TempPoint[1] offset by KB_TempReal towards KB_Angle[KB_GeneralIntegers[1]] degrees)
                  • Set KB_EffectCounter[KB_GeneralIntegers[1]] = (KB_EffectCounter[KB_GeneralIntegers[1]] + 1)
                  • Set KB_EffectCounter2[KB_GeneralIntegers[1]] = (KB_EffectCounter2[KB_GeneralIntegers[1]] + 1)
                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • KB_DestroyTrees[KB_GeneralIntegers[1]] Equal to (==) True
                      • Then - Actions
                        • Destructible - Pick every destructible within 200.00 of KB_TempPoint[2] and do (Actions)
                          • Loop - Actions
                            • Destructible - Kill (Picked destructible)
                      • Else - Actions
                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • KB_EffectCounter[KB_GeneralIntegers[1]] Equal to (==) 6
                      • Then - Actions
                        • Set KB_EffectCounter[KB_GeneralIntegers[1]] = 0
                        • Special Effect - Create a special effect at KB_TempPoint[1] using KB_Effects_1[KB_GeneralIntegers[1]]
                        • Special Effect - Destroy (Last created special effect)
                      • Else - Actions
                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • KB_EffectCounter2[KB_GeneralIntegers[1]] Equal to (==) 8
                      • Then - Actions
                        • Set KB_EffectCounter2[KB_GeneralIntegers[1]] = 0
                        • Special Effect - Create a special effect at KB_TempPoint[1] using KB_Effects_2[KB_GeneralIntegers[1]]
                        • Special Effect - Destroy (Last created special effect)
                      • Else - Actions
                  • Unit - Move KB_Units[KB_GeneralIntegers[1]] instantly to KB_TempPoint[2]
                  • Custom script: call RemoveLocation (udg_KB_TempPoint[1])
                  • Custom script: call RemoveLocation (udg_KB_TempPoint[2])
                  • Set KB_ReachedDistance[KB_GeneralIntegers[1]] = (KB_ReachedDistance[KB_GeneralIntegers[1]] + KB_TempReal)
            • Else - Actions


Trigger:
  • Lanoc Stomp spell
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to (==) Lanoc Stomp
    • Actions
      • -------- This are spell effects. They don´t affect the knockback. --------
      • Set Sample_Point = (Position of (Triggering unit))
      • Set Sample_Group = (Units within 250.00 of Sample_Point matching ((((Matching unit) is A structure) Equal to (==) False) and ((((Matching unit) is Magic Immune) Equal to (==) False) and ((((Matching unit) is alive) Equal to (==) True) and (((Matching unit) belongs to an enemy o
      • Destructible - Pick every destructible within 200.00 of Sample_Point and do (Actions)
        • Loop - Actions
          • Destructible - Kill (Picked destructible)
      • Special Effect - Create a special effect at Sample_Point using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at Sample_Point using Abilities\Spells\NightElf\Taunt\TauntCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- This are the applied actions of the &#039;Actions to apply&#039; trigger. They are in a loop to affect more than one unit. --------
      • Unit Group - Pick every unit in Sample_Group and do (Actions)
        • Loop - Actions
          • Set KBA_Caster = (Triggering unit)
          • Set KBA_TargetUnit = (Picked unit)
          • Set KBA_Level = (Level of (Ability being cast) for (Triggering unit))
          • Set KBA_StartingPosition = (Position of (Triggering unit))
          • Set KBA_Speed = 5.00
          • Set KBA_DistancePerLevel = 150.00
          • Set KBA_SpecialEffects[1] = Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
          • Set KBA_SpecialEffects[2] = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
          • Set KBA_DestroyTrees = True
          • Trigger - Run Cast A Knockback &lt;gen&gt; (checking conditions)
      • -------- --------
      • Custom script: call RemoveLocation (udg_Sample_Point)
      • Custom script: call DestroyGroup (udg_Sample_Group)


Just change the ability being cast...

Will post a demo map as fast as i can.

Here goes the demo map -> View attachment Knockback Demo.w3x <-
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
If I were new to this, I would have no idea how to manipulate that. Here's a simpler version that's easy to modify, but doesn't remove trees or slow the knockback speed as units near the end of their path.

Also, 1346610's Tree Transform Chance trigger won't work for all trees, only the first 64 destructibles in the region. Try this:

Trigger:
  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Destructible - Pick every destructible in (Playable map area) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Destructible-type of (Picked destructible)) Equal to Summer Tree Wall
                  • (Destructible-type of (Picked destructible)) Equal to Ashenvale Tree Wall
                  • (Destructible-type of (Picked destructible)) Equal to Ashenvale Canopy Tree
                  • (Destructible-type of (Picked destructible)) Equal to Black Citadel Tree Wall
                  • (Destructible-type of (Picked destructible)) Equal to Cityscape Fall Tree Wall
                  • (Destructible-type of (Picked destructible)) Equal to Cityscape Snowy Tree Wall
                  • (Destructible-type of (Picked destructible)) Equal to Cityscape Summer Tree Wall (and so on for all tree types)
            • Then - Actions
              • Trigger - Add to Destructible Dies &lt;gen&gt; the event (Destructible - (Picked destructible) dies)
            • Else - Actions


Trigger:
  • Destructible Dies
    • Events
    • Conditions
      • (Random integer number between 1 and 100) Greater than or equal to 2
    • Actions
      • Set TempPoint = (Position of (Dying destructible))
      • Unit - Create 1 Treant for Player 1 (Red) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
 

Attachments

  • Knockback.w3x
    23.5 KB · Views: 199

1346610

New Member
Reaction score
6
If I were new to this, I would have no idea how to manipulate that.

I invite you to re-read the whole trigger.

For manipulating, you just change the things in here wich will incraise for each level you set it to.

Lanoc Stomp spell
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to (==) Lanoc Stomp
Actions
-------- This are spell effects. They don´t affect the knockback. --------
Set Sample_Point = (Position of (Triggering unit))
Set Sample_Group = (Units within 250.00 of Sample_Point matching ((((Matching unit) is A structure) Equal to (==) False) and ((((Matching unit) is Magic Immune) Equal to (==) False) and ((((Matching unit) is alive) Equal to (==) True) and (((Matching unit) belongs to an enemy o
Destructible - Pick every destructible within 200.00 of Sample_Point and do (Actions)
Loop - Actions
Destructible - Kill (Picked destructible)
Special Effect - Create a special effect at Sample_Point using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at Sample_Point using Abilities\Spells\NightElf\Taunt\TauntCaster.mdl
Special Effect - Destroy (Last created special effect)
-------- This are the applied actions of the 'Actions to apply' trigger. They are in a loop to affect more than one unit. --------
Unit Group - Pick every unit in Sample_Group and do (Actions)
Loop - Actions -------- Hero goes the manipulating for each level if you didnt notice in previous post --------
Set KBA_Caster = (Triggering unit)
Set KBA_TargetUnit = (Picked unit)
Set KBA_Level = (Level of (Ability being cast) for (Triggering unit))
Set KBA_StartingPosition = (Position of (Triggering unit))
Set KBA_Speed = 5.00
Set KBA_DistancePerLevel = 150.00
Set KBA_SpecialEffects[1] = Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
Set KBA_SpecialEffects[2] = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
Set KBA_DestroyTrees = True
Trigger - Run Cast A Knockback <gen> (checking conditions)
-------- --------
Custom script: call RemoveLocation (udg_Sample_Point)
Custom script: call DestroyGroup (udg_Sample_Group)

The rest its all copy and paste.

Also, 1346610's Tree Transform Chance trigger won't work for all trees, only the first 64 destructibles in the region.

Yes, i know it but he said he have a LARGE volume of trees (2590 to be specific) bunched together in a gigantic mass so i thought using rect would be better.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
The rest its all copy and paste.
Copying != Learning.

he said he have a LARGE volume of trees (2590 to be specific) bunched together in a gigantic mass so i thought using rect would be better.

Seeing as you made such an advanced knockback system in GUI without using hashtables, I believe you ought to have noticed the little postscript for that event that says: "Only the first 64 destructibles within the region when this event is registered are monitored for death. It is best to use this event for regions containing only a few destructibles."

A large volume of trees? 2590/64 = 40.46875 I guess that means he needs to make 41 rects?

Keep in mind, I do not post this condescendingly or sarcastically, but I would like to point out that an advanced trigger does not help in learning. Copying someone's homework gives you good grades, but you won't learn much unless you can understand it (which I doubt).
 

1346610

New Member
Reaction score
6
Seeing as you made such an advanced knockback system in GUI without using hashtables, I believe you ought to have noticed the little postscript for that event that says: "Only the first 64 destructibles within the region when this event is registered are monitored for death. It is best to use this event for regions containing only a few destructibles."

No comment.Why are you so mad at me?
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Technically, if there is no statement to be made except that there is no statement to be made, then no statement should be made.

Meaning, there's no need to post.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
here is my gui version for a stomp pushback type of ability:

at initialization make a hashtable called Pushback_hash

Trigger:
  • Pushback - cast
    • Events
      • Unit - A unit finishes casting an ability
    • Conditions
      • Ability - Ability being cast is equal to X
    • Actions
      • Set Temp_Group = units in Pushback_Group matching condition (matching unit is alive is equal to true)
      • Set Pushback_Group = Units within x range of casting unit matching condition ([owner of matching unit is an enemy of owner of casting unit] and [matching unit is alive is equal to true])
      • Unit Group - pick every unit in Pushback_Group and do actions
        • Loop actions
          • Set loc[1] = position of casting unit
          • Set loc[2] = position of picked unit
          • Save (position of picked unit offset by [pushback distance] in [angle from loc[1] to loc[2]]) as 1 of (key picked unit) in Pushback_Hash
          • Save (how far they travel at each interval, you choose how long they take to go the distance and how far they go) as 2 of (key picked unit) in Pushback_Hash
          • Save (max distance) as 3 of (key picked unit) in pushback_hash
          • Custom Script: Callremovelocation(UDG_Loc[1])
          • Custom Script: Callremovelocation(UDG_Loc[2])
      • Unit Group - pick every unit in Temp_Group and do actions
        • Loop actions
          • Unit Group - add picked unit to Pushback_Group
      • Trigger - Turn on Pushback &lt;gen&gt;
      • Custom Script: Calldestroyunitgroup(UDG_Temp_Group)


Trigger:
  • Pushback
    • Events
      • Time - Periodic Event every X (interval for pushback, smaller = smoother push but more lag) seconds
    • Conditions
    • Actions
      • Set Temp_Group = units in pushback_group
      • Unit Group - pick every unit in temp_group and do actions
        • loop actions
          • Set loc[1] = position of picked unit
          • Set loc[2] = Load 1 of (key of picked unit) in Pushback_hash
          • If then else
            • If
              • Or
                • Boolean - picked unit is alive is equal to false
                • Real - Distance between loc[1] and loc[2] is less than or equal to (load 2 of (key picked unit) in pushback_hash)
            • Then
              • If then else
                • If
                  • Boolean - Picked unit is alive is equal to true
                • Then
                  • Unit - turn off pathing for picked unit
                  • Unit - Move unit instantly to loc[2]
                  • Unit Group - Remove unit from Pushback_group
                  • Hashtable - Clear child hashtable of (key picked unit)
                • Else
                  • Unit Group - Remove unit from Pushback_group
                  • Hashtable - Clear child hashtable of (key picked unit)
            • Else
              • Set Loc[3] = Loc[1] offset by (load 2 of (key picked unit) in pushback_hash) in the direction of (angle from loc[1] to loc[2])
              • Unit - Move unit instantly to loc[3]
          • Custom Script: Callremovelocation(UDG_Loc[1])
          • Custom Script: Callremovelocation(UDG_Loc[2])
          • Custom Script: Callremovelocation(UDG_Loc[3])
      • If then else
        • If
          • Integer - Number of units in pushback_group is equal to 0
        • Then
          • Custom Script: Calldestroyunitgroup(UDG_Pushback_Group)
          • Trigger - Turn off this trigger
        • Else
      • Custom Script: Calldestroyunitgroup(UDG_Temp_Group)
 

Aserpent

New Member
Reaction score
2
Woah! I appreciate all the help you guys are giving me! New question!
A (hopefully) simple one - How to check if a triggering unit is a certain level? In this case, 10
 

Sim

Forum Administrator
Staff member
Reaction score
534
You probably mean Hero level, which in that case is the following condition:

(Hero level of (Triggering unit)) Equal to 10

Integer comparison - Hero - Hero Level.

By the way, concerning threads with multiple questions, please do not add further questions once the original ones have been answered:

Forum Rules said:
A. Here's the deal. You may ask more than one question in a single thread. But DO NOT ADD MORE QUESTIONS LATER! I.E. no more "User's Question Thread". They are unwieldy and very hard to follow. Start a new thread when you have new questions.
 

Aserpent

New Member
Reaction score
2
You probably mean Hero level, which in that case is the following condition:

(Hero level of (Triggering unit)) Equal to 10

Integer comparison - Hero - Hero Level.

By the way, concerning threads with multiple questions, please do not add further questions once the original ones have been answered:

Oh! Haha, sorry, I should probably go read the rules... >_<
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top