Can u check my spell trigger please? TY

Level 5
Joined
Jul 2, 2013
Messages
141
Hello, My trigger seems to work and I don't see mistakes. But I thought You could check to make sure.

The spell is like this: A Lightning shield to deal x1 intel of the caster each second around the target unit cast in a range of 200 to all enemy units for 12 seconds. I tested it and works fine, but you never know.


Troll Shield Spell
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Lightning Shield
Actions
Set TrollShieldDMG[(Player number of (Owner of (Casting unit)))] = ((Intelligence of (Casting unit) (Include bonuses)) + 1)
Set TrollShieldCaster[(Player number of (Owner of (Casting unit)))] = (Casting unit)
Set TrollShieldTarget[(Player number of (Owner of (Casting unit)))] = (Target unit of ability being cast)
Set TrollShieldTime[(Player number of (Owner of (Casting unit)))] = 12
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Wait 1.00 seconds
Set TrollShieldTime[(Player number of (Owner of (Casting unit)))] = (TrollShieldTime[(Player number of (Owner of (Casting unit)))] - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TrollShieldTime[(Player number of (Owner of TrollShieldCaster[(Player number of (Owner of (Casting unit)))]))] Greater than or equal to 1
Then - Actions
Set TrollShieldGroupDMG = (Units within 200.00 of (Position of TrollShieldTarget[(Player number of (Owner of (Casting unit)))]) matching (((Matching unit) belongs to an enemy of (Owner of TrollShieldTarget[(Player number of (Owner of (Casting unit)))])) Equal to True))
Unit Group - Pick every unit in TrollShieldGroupDMG and do (Unit - Cause TrollShieldTarget[(Player number of (Owner of (Casting unit)))] to damage (Picked unit), dealing (Real(TrollShieldDMG[(Player number of (Owner of (Casting unit)))])) damage of attack type Spells and damage type Normal)
Custom script: call DestroyGroup(udg_TrollShieldGroupDMG)
Else - Actions
 
Level 14
Joined
Jun 15, 2016
Messages
750
You should do "dynamic indexing" to make this spell MUI (Multi Unit Instanceable), instead of MPI (Multi Player Instanceable). Besides, use "timer" and don't use wait in your spell because it's inaccurate.
In short, your current caster duration will be overlaped if same unit of same player casts same spell during that time.
This GUI structure suitable when each player triggers this event one time only, rather than spells.
 
Level 5
Joined
Jul 2, 2013
Messages
141
Yes, Thank you very much, MPI is just what I need. So basically you mean if I use a timer, it could become MUI? I understand, although my skills are limited and I would have trouble making it MUI.
 
Level 5
Joined
Jul 2, 2013
Messages
141
How to edit it with timer trigger guys for MUI if I wanted it? And why do u think i need timer even for MPI?
 
Top