Help on merging functions

neetmaster

New Member
Reaction score
0
Code:
function Trig_Learning_Spells_Func002A takes nothing returns nothing
    set udg_spellLearningUnit = GetEnumUnit()
endfunction

Code:
function Trig_Learning_Spells_Actions takes nothing returns nothing
    set udg__tempUnitGroup = GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'H002')
    call ForGroupBJ( udg__tempUnitGroup, function Trig_Learning_Spells_Func002A )
    call DestroyGroup (udg__tempUnitGroup)

How can I merge the upper one into the lower one so I will have less functions in a trigger?
Thanks.
 

_whelp

New Member
Reaction score
54

neetmaster

New Member
Reaction score
0
I'm not sure if I want to change the structure of the whole function...
Thanks anyways. More ideas welcomed though.
 

Frozenhelfir

set Gwypaas = Guhveepaws
Reaction score
56
Um... what is that supposed to accomplish? It will only set that variable to the last unit in the group. Perhaps you should use an array, or maybe you just want the triggering unit to be set to that variable since it'd be the one learning the spell?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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