• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Copied triggers for spells not working properly on my custom map

Status
Not open for further replies.
Level 6
Joined
Jan 2, 2015
Messages
171
hi, i jst copied the berserker spells from dota map and it never work even after i copied exact trigger, spell, buff and dummy. unit can someone find out the problem source? i will attach the dota map and the test map where i did copied the spells from dota map.
 

Attachments

  • DotA Spellpack 2 In 1.w3x
    48.7 KB · Views: 27
  • test map berserkercall.w3x
    35.9 KB · Views: 30
When I first saw the triggers in your test map, my initial guess was that the unit group array wasn't being initialized because WC3 is weird. Lo and behold, I was right :D

In DotA Spellpack 2 In 1, the size of the unit group array BerserkerCall_AttackGroup is 1000 where yours is 1.

An extremely easy fix is to just enter the variable editor and change the array size to 1000 as well (or some other huge arbitary number), or you can add this to the trigger:
  • on index
    • Custom script: if (udg_BerserkerCall_AttackGroup[udg_BerserkerCall_Counts] == null) then
    • Custom script: set udg_BerserkerCall_AttackGroup[udg_BerserkerCall_Counts] = CreateGroup()
    • Custom script: endif
  • on deindex
    • Custom script: call DestroyGroup(udg_BerserkerCall_AttackGroup[udg_BerserkerCall_CustomValue])
    • Custom script: set udg_BerserkerCall_AttackGroup[udg_BerserkerCall_CustomValue] = null
I recommend the latter solution.
 
Status
Not open for further replies.
Top