Unit group problem

dratiny

New Member
Reaction score
0
Hello,

I am working on a custom spell, and everything is working fine, but the damage system. The spell basically makes the bladesmaster travel in a line (with the spin animation) and destroy any trees / damage any units it encounters in its path (a bit like tryndamere's spinning slash if you ever played LoL).

The trigger is the following one (will fire every 0.03 seconds until the end of the spell.

Code:
Set tempUnitGroup = (Units within BS_AoE of tempPoint)
Unit group - Pick every unit in tempUnitGroup and do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                        ((Picked unit) is in BS_DamagedUnits[tempInteger]) Equals  FALSE
                        ((Picked unit) belongs to an ally of BS_Player[tempInteger]) Equals  FALSE
            Then - Actions
                Unit group - Add (Picked unit) to BS_DamagedUnits[tempInteger]
                Unit - Cause BS_Caster[tempInteger] to damage (Picked unit), dealing BS_Damage[tempInteger] damage of attack type Spell and damage type Normal
Custom script:  call DestroyGroup(udg_tempUnitGroup)

The problem is, I want the spell to damage each unit only once, and right now it damages them every 0.03 seconds. I don't know what is wrong.
 

vypur85

Hibernate
Reaction score
803
In the Variable Editor, what is the array size of 'BS_DamagedUnits'? Set it to a high value, 100, perhaps. And then try the spell again.

Also, since I'm not able to see the entire trigger, I hope the 'tempInteger' is used properly in your triggering. Otherwise it'd spoil the entire spell.
 

dratiny

New Member
Reaction score
0
tempInteger is the integer I'm using for the Loop (Mui style :p)
worked very well, thank you a lot ! :]

(is there a way I can +rep you or something? I'm a new member :D)
 

Solu9

You can change this now in User CP.
Reaction score
216
(is there a way I can +rep you or something? I'm a new member :D)

Press the little "like" in the bottom right corner of vypur85's post.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top