kallieblakie
New Member
- Reaction score
- 5
okay i believe these are the codes that causes the fatal error.
Please help !
Fatal error occurs anytime in the game, sometimes no fatal error at all. I've got 12 of such triggers for 12 different players. Please help me point out the problem!
Code:
Arrow Activate
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Elune's Arrow
(Owner of (Casting unit)) Equal to Player 1 (Red)
Arrow[1] Equal to No unit
Actions
Set AimingAngle[(Player number of (Owner of (Casting unit)))] = 0.00
Set CastTarget = (Target point of ability being cast)
Unit - Make (Casting unit) face CastTarget over 0.00 seconds
Custom script: call RemoveLocation (udg_CastTarget)
Wait 0.01 seconds
Set AimingAngle[(Player number of (Owner of (Casting unit)))] = (Facing of (Casting unit))
Set HeroPosition[(Player number of (Owner of (Casting unit)))] = (Position of (Casting unit))
Set ShootCreatingPosition[(Player number of (Owner of (Casting unit)))] = (HeroPosition[(Player number of (Owner of (Casting unit)))] offset by 34.00 towards AimingAngle[(Player number of (Owner of (Casting unit)))] degrees)
Custom script: call RemoveLocation (udg_HeroPosition[1])
Unit - Create 1 Arrow for (Owner of (Casting unit)) at ShootCreatingPosition[(Player number of (Owner of (Casting unit)))] facing AimingAngle[(Player number of (Owner of (Casting unit)))] degrees
Animation - Change (Last created unit) turn speed to 1.00
Set Scale = (100.00 x ((Real(Radius[(Player number of (Owner of (Casting unit)))])) / 80.00))
Animation - Change (Last created unit)'s size to (Scale%, Scale%, Scale%) of its original size
Custom script: call RemoveLocation (udg_ShootCreatingPosition[1])
Set Arrow[(Player number of (Owner of (Casting unit)))] = (Last created unit)
Set ArrowCurrentDist[(Player number of (Owner of (Casting unit)))] = 0
Unit - Turn collision for (Last created unit) Off
Code:
Arrow Periodic
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ArrowCurrentDist[1] Less than or equal to Range[1]
Then - Actions
Set ArrowCurrent[1] = (Position of Arrow[1])
Set ArrowNext[1] = (ArrowCurrent[1] offset by Speed[1] towards AimingAngle[1] degrees)
Custom script: call RemoveLocation (udg_ArrowCurrent[1])
Unit - Move Arrow[1] instantly to ArrowNext[1]
Set ArrowCurrentDist[1] = (ArrowCurrentDist[1] + (Integer(Speed[1])))
Set UnitCheck = (Units within (Real(Radius[1])) of ArrowNext[1])
Set Temp_UG = (Random 1 units from UnitCheck)
Custom script: call DestroyGroup (udg_UnitCheck)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in Temp_UG) Greater than 0
Then - Actions
Unit Group - Pick every unit in Temp_UG and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is alive) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) belongs to an ally of Player 1 (Red)) Equal to True
((Picked unit) has buff Stunned (Pause)) Equal to True
((Picked unit) is alive) Equal to True
Then - Actions
Unit - Cause PlayerU[1] to damage (Picked unit), dealing 10000.00 damage of attack type Spells and damage type Normal
Set ArrowCurrentDist[1] = 10000
Sound - Play MetalHeavyBashFlesh2 <gen>
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) belongs to an enemy of Player 1 (Red)) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Stunned (Pause)) Equal to True
Then - Actions
Unit - Cause PlayerU[1] to damage (Picked unit), dealing 10000.00 damage of attack type Spells and damage type Normal
Set ArrowCurrentDist[1] = 10000
Sound - Play MetalHeavyBashFlesh2 <gen>
Else - Actions
Unit - Cause PlayerU[1] to damage (Picked unit), dealing Damage[1] damage of attack type Spells and damage type Normal
Set ArrowCurrentDist[1] = 10000
Unit - Create 1 Dummy for (Owner of Arrow[1]) at ArrowNext[1] facing Default building facing degrees
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Add Stun to (Last created unit)
Unit - Set level of Stun for (Last created unit) to Stun[1]
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
For each (Integer A) from 1 to 1, do (Actions)
Loop - Actions
Set TP = (Position of PlayerU[(Integer A)])
Unit - Cause PlayerU[(Integer A)] to damage (Picked unit), dealing ((35000.00 x (0.40 x (Real(I_bladeLevel[(Integer A)])))) / (Abs((Distance between TP and ArrowNext[(Integer A)])))) damage of attack type Spells and damage type Normal
Unit - Cause PlayerU[(Integer A)] to damage (Picked unit), dealing ((Real(I_PrecisionLevel[(Integer A)])) x (0.06 x (Abs((Distance between ArrowNext[(Integer A)] and TP))))) damage of attack type Spells and damage type Normal
Custom script: call RemoveLocation (udg_TP)
Else - Actions
Else - Actions
Else - Actions
Custom script: call RemoveLocation (udg_ArrowNext[1])
Custom script: call DestroyGroup (udg_Temp_UG)
Else - Actions
Unit - Remove Arrow[1] from the game
Set Arrow[1] = No unit
Set AimingAngle[1] = 0.00
Please help !
Fatal error occurs anytime in the game, sometimes no fatal error at all. I've got 12 of such triggers for 12 different players. Please help me point out the problem!