• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[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

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.
Back
Top