| 05-02-2006, 06:03 PM | #1 |
nothing complicated here. yet the computer opponent won't revive heroes. JASS:function IsBld takes nothing returns boolean return IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true endfunction function Trig_HRevive_Actions takes nothing returns nothing local unit hero = GetRevivableUnit() local group g = CreateGroup() local player p = GetOwningPlayer(hero) local integer i = GetPlayerId(p)+1 if GetPlayerController(p) == MAP_CONTROL_COMPUTER then call GroupEnumUnitsInRect(g, udg_Paltar[i], Filter(function IsBld)) call GroupPointOrder(g, "setrally", GetRectCenterX(udg_HeroOut[i]),GetRectCenterY(udg_HeroOut[i])) call GroupTargetOrder(g, "revive", hero) endif call DestroyGroup(g) set hero = null set p = null set g = null endfunction function InitTrig_HRevive takes nothing returns nothing set gg_trg_HRevive = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_HRevive, EVENT_PLAYER_HERO_REVIVABLE ) call TriggerAddAction( gg_trg_HRevive, function Trig_HRevive_Actions ) endfunction |
| 05-02-2006, 06:14 PM | #2 |
I do not believe that you can do those orders to a group. Try using a specific unit order. I may be wrong though. |
| 05-02-2006, 06:20 PM | #3 | |
Quote:
Good thought. yet it wasn't working with specific order either. |
| 05-02-2006, 06:56 PM | #4 |
Have you tried debug messages? like.. is the altar really inside that rect? |
| 05-02-2006, 07:07 PM | #5 |
edit: got it. Should that ever happen again, remember to paste a little wait! |
