Hello, so I tried to copy 1 spell from other map(map creator allowed me to do this), but something wrong.. getting syntax error and game doesn't start, just frozen throne main screen opens.
What's wrong ?
Spell Night Dart
-
Night Dart
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Night Dart
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- AM_Skip Equal to 0
-
Then - Actions
- Trigger - Turn on Missile Loop <gen>
- Else - Actions
-
If - Conditions
- Set HeroAngle[(Player number of (Owner of (Triggering unit)))] = (Facing of (Triggering unit))
- Set HeroPos[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
- Set Energy[(Player number of (Owner of (Triggering unit)))] = (Mana of Hero[(Player number of (Owner of (Triggering unit)))])
- Set RangedPower[(Player number of (Owner of (Triggering unit)))] = (Agility of Hero[(Player number of (Owner of (Triggering unit)))] (Include bonuses))
- Set AbilityDamage[(Player number of (Owner of (Triggering unit)))] = (Energy[(Player number of (Owner of (Triggering unit)))] + (Real(RangedPower[(Player number of (Owner of (Triggering unit)))])))
- Set AM_Skip = (AM_Skip + 1)
- Set AM_Times = (AM_Times + 1)
- Set AM_Off[AM_Times] = True
- Set AM_Name[AM_Times] = (Name of (Ability being cast))
- Set AM_Hero[AM_Times] = (Triggering unit)
- Set AM_Point[0] = (Position of (Triggering unit))
- Set AM_Point[1] = (Target point of ability being cast)
- Set AM_Angle[AM_Times] = (Angle from AM_Point[0] to AM_Point[1])
- Set AM_Dmg[AM_Times] = AbilityDamage[(Player number of (Owner of (Triggering unit)))]
- Set AM_AoE[AM_Times] = 70.00
- Set AM_Collision[AM_Times] = 70.00
- Unit - Create 1 Missile Counter for (Owner of AM_Hero[AM_Times]) at AM_Point[0] facing AM_Angle[AM_Times] degrees
- Set AM_Missile[AM_Times] = (Last created unit)
- Special Effect - Create a special effect attached to the chest of (Last created unit) using Abilities\Spells\Other\BlackArrow\BlackArrowMissile.mdl
- Set AM_FX[AM_Times] = (Last created special effect)
- Animation - Change AM_Missile[AM_Times] flying height to 30.00 at 0.00
- Set AM_Speed[AM_Times] = 27.00
- Set AM_Distance[AM_Times] = 600.00
- Custom script: call RemoveLocation ( udg_AM_Point[0] )
- Custom script: call RemoveLocation ( udg_AM_Point[1] )
- Custom script: call RemoveLocation ( udg_HeroPos[(GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())))])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Missile Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer AM) from 1 to AM_Times, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- AM_Off[AM] Equal to True
-
Then - Actions
- Set AM_Point[2] = (Position of AM_Missile[AM])
- Set AM_Point[3] = (AM_Point[2] offset by AM_Speed[AM] towards AM_Angle[AM] degrees)
- Custom script: set udg_AM_X[udg_AM] = GetLocationX(udg_AM_Point[3])
- Custom script: set udg_AM_Y[udg_AM] = GetLocationY(udg_AM_Point[3])
- Custom script: call SetUnitX(udg_AM_Missile[udg_AM], udg_AM_X[udg_AM])
- Custom script: call SetUnitY(udg_AM_Missile[udg_AM], udg_AM_Y[udg_AM])
- Set AM_Distance[AM] = (AM_Distance[AM] - AM_Speed[AM])
- Set AM_Group = (Units within AM_Collision[AM] of AM_Point[3] matching ((((Matching unit) belongs to an enemy of (Owner of AM_Missile[AM])) Equal to True) and (((Matching unit) is alive) Equal to True)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- RangedWeapon[(Player number of (Owner of AM_Hero[AM]))] Equal to
-
Then - Actions
- Set AM_BonusDamage[AM] = (AM_BonusDamage[AM] + 1.66)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in AM_Group) Greater than 0
-
Then - Actions
- Custom script: call DestroyGroup ( udg_AM_Group )
- Set AM_Distance[AM] = 0.00
- Set AM_Dmg[AM] = (AM_Dmg[AM] + AM_BonusDamage[AM])
- Set AM_Group = (Units within AM_AoE[AM] of AM_Point[3] matching ((((Matching unit) belongs to an enemy of (Owner of AM_Missile[AM])) Equal to True) and (((Matching unit) is alive) Equal to True)))
-
Unit Group - Pick every unit in AM_Group and do (Actions)
-
Loop - Actions
- Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\HydraliskImpact\HydraliskImpact.mdl
- Special Effect - Destroy (Last created special effect)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- AM_Name[AM] Equal to (Name of Night Dart )
-
Then - Actions
- Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - ((Mana of (Picked unit)) / 20.00))
- Unit - Set life of AM_Hero[AM] to ((Life of AM_Hero[AM]) + ((Mana of (Picked unit)) / 20.00))
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- AM_Distance[AM] Less than or equal to 0.00
- (Terrain pathing at AM_Point[3] of type Flyability is off) Equal to True
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Special Effect - Destroy AM_FX[AM]
- Unit - Kill AM_Missile[AM]
- Set AM_BonusDamage[AM] = 0.00
- Set AM_Skip = (AM_Skip - 1)
- Set AM_Count = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Siege Engine) and (((Matching unit) is alive) Equal to True)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in AM_Count) Equal to 0
-
Then - Actions
- Set AM_Off[AM] = False
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- AM_Skip Equal to 0
-
Then - Actions
- Set AM_Times = 0
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
- Custom script: call DestroyGroup(udg_AM_Count)
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation ( udg_AM_Point[2] )
- Custom script: call RemoveLocation ( udg_AM_Point[3] )
- Custom script: call DestroyGroup ( udg_AM_Group )
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer AM) from 1 to AM_Times, do (Actions)
-
Events