Hello!
This trigger is causing me to get error message ''expected set'' when I start the map:
What can be wrong?
This trigger is causing me to get error message ''expected set'' when I start the map:
Trigger:
- Mind Flay
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Mind Flay
- Actions
- Custom script: local unit Caster = GetTriggerUnit()
- Custom script: local unit Target = GetSpellTargetUnit()
- Custom script: local real Time
- Custom script: local real Damage
- Set Caster = (Triggering unit)
- Set Target = (Target unit of ability being cast)
- Set MindFlay_Channeling[(Custom value of Caster)] = True
- Set MindFlay_Target[(Custom value of Caster)] = Target
- Set MindFlay_Ticks[(Custom value of Caster)] = 0.00
- Unit Group - Add (Triggering unit) to MindFlay_Group
- Set Damage = (Random real number between 295.00 and 305.00)
- Set SpellPower_Percent = 1.00
- Trigger - Run Spell Power <gen> (checking conditions)
- Set Damage = (Damage / 3.00)
- Custom script: Damage = udg_Damage
- Set Point[1] = (Position of Caster)
- Unit - Create 1 Dummy Unit for (Owner of Caster) at Point[1] facing Default building facing degrees
- Unit - Add Mind Flay (Slow) (Dummy) to (Last created unit)
- Unit - Order (Last created unit) to Human Sorceress - Slow Target
- Custom script: call RemoveLocation (udg_Point[1])
- Trigger - Turn on Mind Flay Periodic <gen>
- Set CastingTime = (1.00 - Stat_Haste[(Player number of (Owner of Caster))])
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- CastingTime Less than 0.50
- Then - Actions
- Set CastingTime = 0.50
- Else - Actions
- If - Conditions
- Custom script: set Time = udg_CastingTime
- For each (Integer MindFlay_Loop[(Custom value of Caster)]) from 1 to 3, do (Actions)
- Loop - Actions
- Custom script: call TriggerSleepAction( Time )
- Custom script: set udg_Caster = Caster
- Custom script: set udg_Target = Target
- Custom script: set udg_Damage = Damage
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- MindFlay_Ticks[(Custom value of Caster)] Less than 3.00
- Then - Actions
- Set Point[1] = (Position of Caster)
- Set Point[2] = (Position of Target)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Target is alive) Equal to True
- (Distance between Point[1] and Point[2]) Less than 1500.00
- Then - Actions
- Trigger - Run Critical Strike <gen> (checking conditions)
- Unit - Cause Caster to damage Target, dealing Damage damage of attack type Spells and damage type Normal
- Special Effect - Create a special effect attached to the origin of Target using Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmDamage.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation (udg_Point[1])
- Custom script: call RemoveLocation (udg_Point[2])
- Else - Actions
- Unit - Order Caster to Stop
- Set MindFlay_Channeling[(Custom value of Caster)] = False
- Custom script: call RemoveLocation (udg_Point[1])
- Custom script: call RemoveLocation (udg_Point[2])
- Skip remaining actions
- If - Conditions
- Set MindFlay_Ticks[(Custom value of Caster)] = (MindFlay_Ticks[(Custom value of (Triggering unit))] + 1.00)
- Else - Actions
- Unit - Order Caster to Stop
- Set MindFlay_Channeling[(Custom value of Caster)] = False
- Skip remaining actions
- If - Conditions
- Loop - Actions
- Events
What can be wrong?