Hi i have made a spell that using water effect with some imported models
i would like to know which are not needed. How could i improve code performance and also making good for an approval!
here is the code : The way im making my code is in separate triggers or the code get so big im getting lost in it and where there is a glitch idk where to find it so i made it in more than 2 trigger
here is the code
here is the map also if yall need to work on it.
Like i said Trigger is split for my own understanding! if making them in the same code would improve performance i would unless i wont merge trigger.
The spell itself use an orbit engine made on my own to make xtra effect!! : i think it could be merge but if poeple(noob) dont like they wont be able to remove it that e-z
Thanks for your time took plz add good comments with exemple : my english blow im french i do not know all meaning and words
i would like to know which are not needed. How could i improve code performance and also making good for an approval!
here is the code : The way im making my code is in separate triggers or the code get so big im getting lost in it and where there is a glitch idk where to find it so i made it in more than 2 trigger
here is the code
-
Suiton Daibaikusui shoha Call
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Suiton Daibakusui Shoha
-
Actions
- Set TriggerUnit = (Triggering unit)
- -------- ------------------------------------ --------
- Set ORB_Source = TriggerUnit
- Set TempLoc = (Position of ORB_Source)
- Set TempLoc3 = (Position of ORB_Source)
- Set ORB_NumberEffect = 4
- Set ORB_AreaOfEffect = 500.00
- Set ORB_DummyAnimationSpeed = 75.00
- Set ORB_MoveSpeed = 10.00
- Set ORB_DummySize = 100.00
- Set ORB_DummyGroundEffect = Abilities\Weapons\LichMissile\LichMissile.mdl
- Set ORB_MissileModel = Abilities\Spells\Other\CrushingWave\CrushingWaveMissile.mdl
- Set ORB_IntegerAbility = (Level of (Ability being cast) for TriggerUnit)
- Set ORB_Offset = 500
- Set ORB_DamagePerLoop = (1.00 x (Real(ORB_IntegerAbility)))
- Set ORB_DummySpeed = (10.00 x (Real(ORB_IntegerAbility)))
- Set ORB_SpellDuration = (3.00 x (Real(ORB_IntegerAbility)))
- -------- ------------------------------------ --------
- -------- ------------------------------------ --------
- Special Effect - Create a special effect attached to the origin of ORB_Source using HealingWater.MDX
- Special Effect - Destroy (Last created special effect)
- Special Effect - Create a special effect attached to the origin of ORB_Source using war3mapImported\AquaSpike.mdx
- Special Effect - Destroy (Last created special effect)
- -------- ------------------------------------ --------
- -------- ------------------------------------ --------
- Unit - Create 1 DummyUnit for (Owner of ORB_Source) at TempLoc facing Default building facing degrees
- Set ORB_Origin = (Last created unit)
- -------- ------------------------------------ --------
- Unit - Create 1 Aura for (Owner of ORB_Source) at TempLoc facing Default building facing degrees
- Set ORB_Origin2 = (Last created unit)
- -------- ------------------------------------ --------
- Unit - Create 1 Aura second for (Owner of ORB_Source) at TempLoc facing Default building facing degrees
- Set ORB_Origin3 = (Last created unit)
- -------- ------------------------------------ --------
- Unit - Create 1 Dummy Naga Death for (Owner of ORB_Source) at TempLoc3 facing Default building facing degrees
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Animation - Change (Last created unit)'s size to (250.00%, 250.00%, 250.00%) of its original size
- -------- ------------------------------------ --------
- Unit - Create 1 Dummy Naga Death for (Owner of ORB_Source) at TempLoc3 facing Default building facing degrees
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Animation - Change (Last created unit)'s size to (100.00%, 100.00%, 100.00%) of its original size
- -------- ------------------------------------ --------
- Set ORB_Point = (Position of ORB_Origin)
- -------- ------------------------------------ --------
- Unit - Add Hidden Book to ORB_Origin3
- Player - Disable Hidden Book for (Owner of (Triggering unit))
- -------- ------------------------------------ --------
- Trigger - Run Swirl Engine Core <gen> (checking conditions)
- -------- ------------------------------------ --------
- Custom script: call RemoveLocation(udg_TempLoc)
- Custom script: call RemoveLocation(udg_TempLoc3)
- -------- ------------------------------------ --------
- Set ORB_Source = TriggerUnit
- Set ORB_Origin4 = ORB_Origin3
- Set ORB_Point = (Position of ORB_Origin4)
- Set ORB_NumberEffect = 4
- Set ORB_AreaOfEffect = 500.00
- Set ORB_IntegerAbility = (Level of (Ability being cast) for TriggerUnit)
- Set ORB_DummyAnimationSpeed = 25.00
- Set ORB_DummyGroundEffect = war3mapImported\NagaDeathSpare.mdl
- Set ORB_MissileModel = war3mapImported\AquaSpike.mdl
- Set ORB_DamagePerLoop = (1.00 x (Real(ORB_IntegerAbility)))
- Set ORB_DummySpeed = (10.00 x (Real(ORB_IntegerAbility)))
- Set ORB_MoveSpeed = 10.00
- Set ORB_DummySize = 100.00
- Set ORB_Offset = 250
- Set ORB_SpellDuration = ORB_SpellDuration
- Trigger - Run Orbiting Fire <gen> (checking conditions)
- -------- ------------------------------------ --------
- Countdown Timer - Start KisameDaibak_Timer as a One-shot timer that will expire in ORB_SpellDuration seconds
- -------- ------------------------------------ --------
-
Events
-
Swirl Engine Core
- Events
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SORF_Index_Size Equal to 0
-
Then - Actions
- Trigger - Turn on Swirl Engine Loop 4 <gen>
- Else - Actions
-
If - Conditions
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- Set SP_Index_Size = (SP_Index_Size + 1)
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SP_Index_Size Greater than SP_Index_maxSize
-
Then - Actions
- Set SP_Index[SP_Index_Size] = SP_Index_Size
- Set SP_Index_maxSize = SP_Index_Size
- Else - Actions
-
If - Conditions
- Set SP_Int = SP_Index[SP_Index_Size]
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- -------- NUMBER OF ORBITING EFFECT ? --------
- Set SCL_NumE[SP_Int] = ORB_NumberEffect
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
-
For each (Integer SORF_Loop[SP_Int]) from 1 to SCL_NumE[SP_Int], do (Actions)
-
Loop - Actions
- Set TempLoc = ORB_Point
- -------- Increase the index size --------
- Set SORF_Index_Size = (SORF_Index_Size + 1)
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- -------- Dynamic Index --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SORF_Index_Size Greater than SORF_Index_maxSize
-
Then - Actions
- Set SORF_Index[SORF_Index_Size] = SORF_Index_Size
- Set SORF_Index_maxSize = SORF_Index_Size
- Else - Actions
-
If - Conditions
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- -------- Dynamic Index End --------
- Set SORFInt = SORF_Index[SORF_Index_Size]
- -------- Setup those arrays --------
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- Set SORF_NumE[SORFInt] = SCL_NumE[SP_Int]
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- Set SORF_CASTER[SORFInt] = ORB_Source
- Set SORF_DummyOrigin[SORFInt] = ORB_Origin
- Set SORF_DummyOrigin2[SORFInt] = ORB_Origin2
- Set SORF_DummyOrigin3[SORFInt] = ORB_Origin3
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- -------- ------- Setup Section----- --------
- Set SORF_IntegerAbility[SORFInt] = ORB_IntegerAbility
- Set SORF_Duration[SORFInt] = ORB_SpellDuration
- Set SORF_LoopTurn[SORFInt] = 0.05
- Set SORF_MoveSpeed[SORFInt] = ORB_MoveSpeed
- Set SORF_AOE2[SORFInt] = ORB_AreaOfEffect
- Set SORF_Damage[SORFInt] = ORB_DamagePerLoop
- Set SORF_Offset[SORFInt] = ORB_Offset
- Set SORF_Calc[SORFInt] = (360.00 / (Real(SORF_NumE[SP_Int])))
- Set SORF_SfxString1[SORFInt] = ORB_DummyGroundEffect
- Set SORF_SfxStringMissile[SORFInt] = ORB_MissileModel
- Set SORF_DUMMY_ANIMATION_SPEED[SORFInt] = ORB_DummyAnimationSpeed
- Set SORF_DUMMY_SIZER[SORFInt] = ORB_DummySize
- -------- -------------------------------- --------
- Set SORF_XAngle[SORFInt] = (SORF_Calc[SORFInt] x (Real(SORF_Loop[SP_Int])))
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- Set SORF_BooleanKnock[SORFInt] = True
- Set SORF_BOOLEAN[SORFInt] = False
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- -------- we calculate the effect need to give a good circle --------
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- Set TempLoc3 = (TempLoc offset by (Real(SORF_Offset[SORFInt])) towards SORF_XAngle[SORFInt] degrees)
- Unit - Create 1 DummyUnit for (Owner of SORF_CASTER[SORFInt]) at TempLoc3 facing Default building facing degrees
- Set SORF_DummyAura[SORFInt] = (Last created unit)
- Special Effect - Create a special effect attached to the origin of SORF_DummyAura[SORFInt] using SORF_SfxStringMissile[SORFInt]
- Animation - Change SORF_DummyAura[SORFInt]'s size to (SORF_DUMMY_SIZER[SORFInt]%, SORF_DUMMY_SIZER[SORFInt]%, SORF_DUMMY_SIZER[SORFInt]%) of its original size
- Unit - Turn collision for (Last created unit) Off
- Unit - Add Storm Crow Form to (Last created unit)
- Unit - Remove Storm Crow Form from (Last created unit)
- Animation - Change (Last created unit) flying height to 100.00 at 0.00
- Custom script: set udg_SORF_WaterGroup[udg_SORFInt] = CreateGroup()
- Custom script: call RemoveLocation(udg_TempLoc3)
- Custom script: call RemoveLocation(udg_TempLoc)
-
Loop - Actions
- Set SCL_NumE[SP_Int] = 0
- Set SORF_BOOLEAN[SORFInt] = False
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- Set SP_Index[SP_LOOP] = SP_Index[SP_Index_Size]
- Set SP_Index[SP_Index_Size] = SP_Int
- Set SP_Index_Size = (SP_Index_Size - 1)
- Set SP_LOOP = (SP_LOOP - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Swirl Engine Loop 4
-
Events
- Time - Every 0.05 seconds of game time
- Conditions
-
Actions
-
For each (Integer SORF_LOOP) from 1 to SORF_Index_Size, do (Actions)
-
Loop - Actions
- -------- This let look everything cleaner. --------
- Set SORFInt = SORF_Index[SORF_LOOP]
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- Set ORFLoc2 = (Position of SORF_CASTER[SORFInt])
- Set ORFLoc3 = (Position of SORF_CASTER[SORFInt])
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SORF_Duration[SORFInt] Greater than 0.00
-
Then - Actions
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SORF_SpecialAngle[SORFInt] Less than 360.00
-
Then - Actions
- Set SORF_SpecialAngle[SORFInt] = (SORF_SpecialAngle[SORFInt] + SORF_MoveSpeed[SORFInt])
-
Else - Actions
- Set SORF_SpecialAngle[SORFInt] = 0.00
- Set SORF_SpecialAngle[SORFInt] = (SORF_SpecialAngle[SORFInt] + SORF_MoveSpeed[SORFInt])
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SORF_Angle[SORFInt] Less than 1.00
-
Then - Actions
- Set SORF_Angle[SORFInt] = (SORF_XAngle[SORFInt] - SORF_SpecialAngle[SORFInt])
-
Else - Actions
- Set SORF_Angle[SORFInt] = 360.00
- Set SORF_Angle[SORFInt] = (SORF_XAngle[SORFInt] - SORF_SpecialAngle[SORFInt])
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SORF_Offset[SORFInt] Greater than 0
-
Then - Actions
- Set SORF_Offset[SORFInt] = (SORF_Offset[SORFInt] - 5)
-
Else - Actions
- Set SORF_Offset[SORFInt] = 500
- Set SORF_Offset[SORFInt] = (SORF_Offset[SORFInt] - 5)
-
Unit Group - Pick every unit in SORF_WaterGroup[SORFInt] and do (Actions)
-
Loop - Actions
- Unit - Remove (Picked unit) from the game
-
Loop - Actions
-
If - Conditions
- Set SORF_Point[2] = (ORFLoc2 offset by (Real(SORF_Offset[SORFInt])) towards SORF_Angle[SORFInt] degrees)
- Set SORF_LoopCounter[SORFInt] = (SORF_LoopCounter[SORFInt] + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SORF_LoopCounter[SORFInt] Equal to 2
-
Then - Actions
- Special Effect - Create a special effect at SORF_Point[2] using war3mapImported\NagaDeathSpare.mdx
- Special Effect - Destroy (Last created special effect)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SORF_LoopCounter[SORFInt] Equal to 4
-
Then - Actions
- Special Effect - Create a special effect at SORF_Point[2] using SORF_SfxString1[SORFInt]
- Special Effect - Destroy (Last created special effect)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SORF_LoopCounter[SORFInt] Equal to 8
-
Then - Actions
- Set SORF_LoopCounter[SORFInt] = 0
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Set SORF_Point[3] = (Position of SORF_DummyAura[SORFInt])
- Unit - Move SORF_DummyAura[SORFInt] instantly to SORF_Point[2], facing (Angle from SORF_Point[2] to ORFLoc2) degrees
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- Unit - Move SORF_DummyOrigin[SORFInt] instantly to ORFLoc2
- Unit - Move SORF_DummyOrigin2[SORFInt] instantly to ORFLoc2
- Unit - Move SORF_DummyOrigin3[SORFInt] instantly to ORFLoc2
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- Custom script: set udg_SORF_GroupDmg[udg_SORFInt] = CreateGroup()
- Set SORF_GroupDmg[SORFInt] = (Units within SORF_AOE2[SORFInt] of SORF_Point[3] matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of SORF_CASTER[SORFInt])) Equal to True)))
-
Unit Group - Pick every unit in SORF_GroupDmg[SORFInt] and do (Actions)
-
Loop - Actions
- Unit - Cause SORF_CASTER[SORFInt] to damage (Picked unit), dealing SORF_Damage[SORFInt] damage of attack type Magic and damage type Demolition
-
Loop - Actions
- Custom script: call DestroyGroup(udg_SORF_GroupDmg[udg_SORFInt])
-
Destructible - Pick every destructible within SORF_AOE2[SORFInt] of SORF_Point[3] and do (Actions)
-
Loop - Actions
- Destructible - Kill (Picked destructible)
-
Loop - Actions
- Custom script: call RemoveLocation(udg_SORF_Point[3])
- Custom script: call RemoveLocation(udg_SORF_Point[2])
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SORF_Duration[SORFInt] Less than or equal to 0.00
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SORF_BooleanKnock[SORFInt] Equal to True
-
Then - Actions
- Set SORF_BooleanKnock[SORFInt] = False
- -------- ------------------------------------- --------
- Unit - Order SORF_CASTER[SORFInt] to Night Elf Druid Of The Claw - Night Elf Form
- Unit Group - Add SORF_DummyAura[SORFInt] to SORF_WaterGroup[SORFInt]
- Unit Group - Add SORF_DummyOrigin[SORFInt] to SORF_WaterGroup[SORFInt]
- Unit Group - Add SORF_DummyOrigin2[SORFInt] to SORF_WaterGroup[SORFInt]
- Unit Group - Add SORF_DummyOrigin3[SORFInt] to SORF_WaterGroup[SORFInt]
- -------- ------------------------------------- --------
- Unit - Create 1 Dummy Naga Death for (Owner of SORF_CASTER[SORFInt]) at ORFLoc2 facing Default building facing degrees
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Animation - Change (Last created unit)'s size to (200.00%, 200.00%, 200.00%) of its original size
- -------- ------------------------------------- --------
- Custom script: call DestroyGroup(udg_SORF_WaterGroup[udg_SORFInt])
- Unit - Remove Hidden Book from SORF_DummyOrigin3[SORFInt]
- -------- ------------------------------------- --------
- Set SORF_SpecialAngle[SORFInt] = 0.00
- Set SORF_Angle[SORFInt] = 0.00
- -------- RecycleIndex --------
- Set SORF_Index[SORF_LOOP] = SORF_Index[SORF_Index_Size]
- Set SORF_Index[SORF_Index_Size] = SORFInt
- Set SORF_Index_Size = (SORF_Index_Size - 1)
- Set SORF_LOOP = (SORF_LOOP - 1)
- -------- Turn the trigger again off if the index_size is below 0... --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SORF_Index_Size Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Set SORF_Duration[SORFInt] = (SORF_Duration[SORFInt] - SORF_LoopTurn[SORFInt])
- Custom script: call RemoveLocation(udg_ORFLoc2)
-
Loop - Actions
-
For each (Integer SORF_LOOP) from 1 to SORF_Index_Size, do (Actions)
-
Events
-
Orbiting Fire
- Events
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ORF_Index_Size Equal to 0
-
Then - Actions
- Trigger - Turn on Orbiting Fire Loop <gen>
- Else - Actions
-
If - Conditions
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- Set SP_Index_Size = (SP_Index_Size + 1)
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SP_Index_Size Greater than SP_Index_maxSize
-
Then - Actions
- Set SP_Index[SP_Index_Size] = SP_Index_Size
- Set SP_Index_maxSize = SP_Index_Size
- Else - Actions
-
If - Conditions
- Set OIndexInt = SP_Index[SP_Index_Size]
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- -------- NUMBER OF ORBITING EFFECT ? --------
- Set CL_NumE[OIndexInt] = ORB_NumberEffect
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
-
For each (Integer ORF_Loop[OIndexInt]) from 1 to CL_NumE[OIndexInt], do (Actions)
-
Loop - Actions
- Set TempLoc = ORB_Point
- -------- Increase the index size --------
- Set ORF_Index_Size = (ORF_Index_Size + 1)
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- -------- Dynamic Index --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ORF_Index_Size Greater than ORF_Index_maxSize
-
Then - Actions
- Set ORF_Index[ORF_Index_Size] = ORF_Index_Size
- Set ORF_Index_maxSize = ORF_Index_Size
- Else - Actions
-
If - Conditions
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- -------- Dynamic Index End --------
- Set ORFInt = ORF_Index[ORF_Index_Size]
- -------- Setup those arrays --------
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- Set ORF_NumE[ORFInt] = CL_NumE[OIndexInt]
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- Set ORF_CASTER[ORFInt] = ORB_Source
- Set ORF_DummyOrigin[ORFInt] = ORB_Origin4
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- -------- ------- Setup Section----- --------
- Set ORF_IntegerAbility[ORFInt] = ORB_IntegerAbility
- Set ORF_Duration[ORFInt] = ORB_SpellDuration
- Set ORF_LoopTurn[ORFInt] = 0.10
- Set ORF_MoveSpeed[ORFInt] = ORB_MoveSpeed
- Set ORF_AOE2[ORFInt] = ORB_AreaOfEffect
- Set ORF_Damage[ORFInt] = ORB_DamagePerLoop
- Set ORF_Offset[ORFInt] = ORB_Offset
- Set ORF_Calc[ORFInt] = (360.00 / (Real(ORF_NumE[OIndexInt])))
- Set ORF_SfxString1[ORFInt] = ORB_DummyGroundEffect
- Set ORF_SfxStringMissile[ORFInt] = ORB_MissileModel
- Set ORF_DUMMY_ANIMATION_SPEED[ORFInt] = ORB_DummyAnimationSpeed
- Set ORF_DUMMY_SIZER[ORFInt] = ORB_DummySize
- -------- -------------------------------- --------
- Set ORF_XAngle[ORFInt] = (ORF_Calc[ORFInt] x (Real(ORF_Loop[OIndexInt])))
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- Set ORF_BooleanKnock[ORFInt] = True
- Set ORF_BOOLEAN[ORFInt] = False
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- -------- we calculate the effect need to give a good circle --------
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- Set TempLoc3 = (TempLoc offset by (Real(ORF_Offset[ORFInt])) towards ORF_XAngle[ORFInt] degrees)
- Unit - Create 1 Dummy_Map for (Owner of ORF_CASTER[ORFInt]) at TempLoc3 facing Default building facing degrees
- Set ORF_DummyAura[ORFInt] = (Last created unit)
- Special Effect - Create a special effect attached to the origin of ORF_DummyAura[ORFInt] using war3mapImported\AquaSpike.mdx
- Animation - Change ORF_DummyAura[ORFInt]'s size to (ORF_DUMMY_SIZER[ORFInt]%, ORF_DUMMY_SIZER[ORFInt]%, ORF_DUMMY_SIZER[ORFInt]%) of its original size
- Unit - Add a (ORF_Duration[ORFInt] + 0.25) second Generic expiration timer to (Last created unit)
- Unit - Turn collision for (Last created unit) Off
- Unit Group - Add (Last created unit) to ORF_Group[ORFInt]
- Custom script: call RemoveLocation(udg_TempLoc3)
- Custom script: call RemoveLocation(udg_TempLoc)
-
Loop - Actions
- Set CL_NumE[OIndexInt] = 0
- Set ORF_BOOLEAN[ORFInt] = False
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- Set SP_Index[SP_LOOP] = SP_Index[SP_Index_Size]
- Set SP_Index[SP_Index_Size] = OIndexInt
- Set SP_Index_Size = (SP_Index_Size - 1)
- Set SP_LOOP = (SP_LOOP - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Orbiting Fire Loop
-
Events
- Time - Every 0.10 seconds of game time
- Conditions
-
Actions
-
For each (Integer ORF_LOOP) from 1 to ORF_Index_Size, do (Actions)
-
Loop - Actions
- -------- This let look everything cleaner. --------
- Set ORFInt = ORF_Index[ORF_LOOP]
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- Set ORFLoc2 = (Position of ORF_DummyOrigin[ORFInt])
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ORF_Duration[ORFInt] Greater than 0.00
-
Then - Actions
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ORF_SpecialAngle[ORFInt] Less than 360.00
-
Then - Actions
- Set ORF_SpecialAngle[ORFInt] = (ORF_SpecialAngle[ORFInt] + ORF_MoveSpeed[ORFInt])
-
Else - Actions
- Set ORF_SpecialAngle[ORFInt] = 0.00
- Set ORF_SpecialAngle[ORFInt] = (ORF_SpecialAngle[ORFInt] + ORF_MoveSpeed[ORFInt])
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ORF_Angle[ORFInt] Less than 1.00
-
Then - Actions
- Set ORF_Angle[ORFInt] = (ORF_XAngle[ORFInt] - ORF_SpecialAngle[ORFInt])
-
Else - Actions
- Set ORF_Angle[ORFInt] = 360.00
- Set ORF_Angle[ORFInt] = (ORF_XAngle[ORFInt] - ORF_SpecialAngle[ORFInt])
-
If - Conditions
- Set ORF_Point[2] = (ORFLoc2 offset by (Real(ORF_Offset[ORFInt])) towards ORF_Angle[ORFInt] degrees)
- Set ORF_Point[3] = (Position of ORF_DummyAura[ORFInt])
- Unit - Move ORF_DummyAura[ORFInt] instantly to ORF_Point[2], facing (Facing of ORF_CASTER[ORFInt]) degrees
- Set ORF_SpecialCounter[ORFInt] = (ORF_SpecialCounter[ORFInt] + 1)
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ORF_SpecialCounter[ORFInt] Equal to 4
-
Then - Actions
- Special Effect - Create a special effect at ORF_Point[2] using ORF_SfxString1[ORFInt]
- Special Effect - Destroy (Last created special effect)
- Set ORF_Point[4] = (ORFLoc2 offset by (Real((ORF_Offset[ORFInt] + 150))) towards ORF_Angle[ORFInt] degrees)
- Special Effect - Create a special effect at ORF_Point[4] using ORF_SfxString1[ORFInt]
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation(udg_ORF_Point[4])
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ORF_SpecialCounter[ORFInt] Equal to 8
-
Then - Actions
- Special Effect - Create a special effect at ORF_Point[2] using ORF_SfxString1[ORFInt]
- Special Effect - Destroy (Last created special effect)
- Set ORF_Point[4] = (ORFLoc2 offset by (Real((ORF_Offset[ORFInt] + 225))) towards ORF_Angle[ORFInt] degrees)
- Special Effect - Create a special effect at ORF_Point[4] using ORF_SfxString1[ORFInt]
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation(udg_ORF_Point[4])
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ORF_SpecialCounter[ORFInt] Equal to 10
-
Then - Actions
- Set ORF_SpecialCounter[ORFInt] = 0
- Special Effect - Create a special effect attached to the origin of ORF_DummyAura[ORFInt] using war3mapImported\AquaSpike.mdx
- Special Effect - Destroy (Last created special effect)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- -------- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= --------
- Custom script: set udg_ORF_GroupDmg[udg_ORFInt] = CreateGroup()
- Set ORF_GroupDmg[ORFInt] = (Units within ORF_AOE2[ORFInt] of ORF_Point[3] matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of ORF_CASTER[ORFInt])) Equal to True)))
-
Unit Group - Pick every unit in ORF_GroupDmg[ORFInt] and do (Actions)
-
Loop - Actions
- Unit - Cause ORF_CASTER[ORFInt] to damage (Picked unit), dealing ORF_Damage[ORFInt] damage of attack type Spells and damage type Normal
-
Loop - Actions
- Custom script: call DestroyGroup(udg_ORF_GroupDmg[udg_ORFInt])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (ORF_DummyAura[ORFInt] is alive) Equal to True
-
Then - Actions
- -------- ------------------------------------------ --------
- Special Effect - Create a special effect at ORF_Point[2] using ORF_SfxString1[ORFInt]
- Special Effect - Destroy (Last created special effect)
-
Destructible - Pick every destructible within 200.00 of ORF_Point[3] and do (Actions)
-
Loop - Actions
- Destructible - Kill (Picked destructible)
-
Loop - Actions
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_ORF_Point[3])
- Custom script: call RemoveLocation(udg_ORF_Point[2])
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ORF_Duration[ORFInt] Less than or equal to 0.00
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ORF_BooleanKnock[ORFInt] Equal to True
-
Then - Actions
- Set ORF_BooleanKnock[ORFInt] = False
- Unit - Remove ORF_DummyAura[ORFInt] from the game
- Set ORF_SpecialAngle[ORFInt] = 0.00
- Set ORF_Angle[ORFInt] = 0.00
- -------- RecycleIndex --------
- Set ORF_Index[ORF_LOOP] = ORF_Index[ORF_Index_Size]
- Set ORF_Index[ORF_Index_Size] = ORFInt
- Set ORF_Index_Size = (ORF_Index_Size - 1)
- Set ORF_LOOP = (ORF_LOOP - 1)
- -------- Turn the trigger again off if the index_size is below 0... --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ORF_Index_Size Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Set ORF_Duration[ORFInt] = (ORF_Duration[ORFInt] - ORF_LoopTurn[ORFInt])
- Custom script: call RemoveLocation(udg_ORFLoc2)
-
Loop - Actions
-
For each (Integer ORF_LOOP) from 1 to ORF_Index_Size, do (Actions)
-
Events
here is the map also if yall need to work on it.
Like i said Trigger is split for my own understanding! if making them in the same code would improve performance i would unless i wont merge trigger.
The spell itself use an orbit engine made on my own to make xtra effect!! : i think it could be merge but if poeple(noob) dont like they wont be able to remove it that e-z
Thanks for your time took plz add good comments with exemple : my english blow im french i do not know all meaning and words