For trigger, it should make into 'loops', 'repeat typing' or 'periodic event' makes it better in anyway ? Example :-
Loops:
Repeating Typing:
Or Periodic Event :
Will add a control timer for Periodic Trigger.
The above is only example, kinda messy. What are the pros and cons of those above method, which is better for saving space, easy modification and easy making ? Hope you all will give your oppinions, please and thank you.
Loops:
Code:
Actions
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Set SV_DamageGroup = (Units within 400.00 of SV_Position matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is dead) Not equal to True)) and ((((Matching unit) belongs to an ally of (Owner of SV_Caster)) Not equal to True) and (((Matching unit)
Unit Group - Pick every unit in SV_DamageGroup and do (Actions)
Loop - Actions
Unit - Cause SV_Caster to damage (Picked unit), dealing 40.00 damage of attack type Spells and damage type Magic
Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\HeroBloodElfBlood.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call DestroyGroup (udg_SV_DamageGroup)
Set SV_DamageGroup1 = (Units within 200.00 of SV_Position matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is dead) Not equal to True)) and ((((Matching unit) belongs to an ally of (Owner of SV_Caster)) Not equal to True) and (((Matching unit)
Unit Group - Pick every unit in SV_DamageGroup1 and do (Actions)
Loop - Actions
Unit - Cause SV_Caster to damage (Picked unit), dealing 20.00 damage of attack type Spells and damage type Magic
Custom script: call DestroyGroup (udg_SV_DamageGroup1)
Repeating Typing:
Code:
Actions
Set SV_DamageGroup = (Units within 400.00 of SV_Position matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is dead) Not equal to True)) and ((((Matching unit) belongs to an ally of (Owner of SV_Caster)) Not equal to True) and (((Matching unit)
Unit Group - Pick every unit in SV_DamageGroup and do (Actions)
Loop - Actions
Unit - Cause SV_Caster to damage (Picked unit), dealing 40.00 damage of attack type Spells and damage type Magic
Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\HeroBloodElfBlood.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call DestroyGroup (udg_SV_DamageGroup)
Set SV_DamageGroup1 = (Units within 200.00 of SV_Position matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is dead) Not equal to True)) and ((((Matching unit) belongs to an ally of (Owner of SV_Caster)) Not equal to True) and (((Matching unit)
Unit Group - Pick every unit in SV_DamageGroup1 and do (Actions)
Loop - Actions
Unit - Cause SV_Caster to damage (Picked unit), dealing 20.00 damage of attack type Spells and damage type Magic
Custom script: call DestroyGroup (udg_SV_DamageGroup1)
Set SV_DamageGroup = (Units within 400.00 of SV_Position matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is dead) Not equal to True)) and ((((Matching unit) belongs to an ally of (Owner of SV_Caster)) Not equal to True) and (((Matching unit)
Unit Group - Pick every unit in SV_DamageGroup and do (Actions)
Loop - Actions
Unit - Cause SV_Caster to damage (Picked unit), dealing 40.00 damage of attack type Spells and damage type Magic
Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\HeroBloodElfBlood.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call DestroyGroup (udg_SV_DamageGroup)
Set SV_DamageGroup1 = (Units within 200.00 of SV_Position matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is dead) Not equal to True)) and ((((Matching unit) belongs to an ally of (Owner of SV_Caster)) Not equal to True) and (((Matching unit)
Unit Group - Pick every unit in SV_DamageGroup1 and do (Actions)
Loop - Actions
Unit - Cause SV_Caster to damage (Picked unit), dealing 20.00 damage of attack type Spells and damage type Magic
Custom script: call DestroyGroup (udg_SV_DamageGroup1)
Set SV_DamageGroup = (Units within 400.00 of SV_Position matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is dead) Not equal to True)) and ((((Matching unit) belongs to an ally of (Owner of SV_Caster)) Not equal to True) and (((Matching unit)
Unit Group - Pick every unit in SV_DamageGroup and do (Actions)
Loop - Actions
Unit - Cause SV_Caster to damage (Picked unit), dealing 40.00 damage of attack type Spells and damage type Magic
Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\HeroBloodElfBlood.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call DestroyGroup (udg_SV_DamageGroup)
Set SV_DamageGroup1 = (Units within 200.00 of SV_Position matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is dead) Not equal to True)) and ((((Matching unit) belongs to an ally of (Owner of SV_Caster)) Not equal to True) and (((Matching unit)
Unit Group - Pick every unit in SV_DamageGroup1 and do (Actions)
Loop - Actions
Unit - Cause SV_Caster to damage (Picked unit), dealing 20.00 damage of attack type Spells and damage type Magic
Custom script: call DestroyGroup (udg_SV_DamageGroup1)
Or Periodic Event :
Code:
Events
Time - Every 0.90 seconds of game time
Conditions
Actions
Set SV_DamageGroup = (Units within 400.00 of SV_Position matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is dead) Not equal to True)) and ((((Matching unit) belongs to an ally of (Owner of SV_Caster)) Not equal to True) and (((Matching unit)
Unit Group - Pick every unit in SV_DamageGroup and do (Actions)
Loop - Actions
Unit - Cause SV_Caster to damage (Picked unit), dealing 40.00 damage of attack type Spells and damage type Magic
Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\HeroBloodElfBlood.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call DestroyGroup (udg_SV_DamageGroup)
Set SV_DamageGroup1 = (Units within 200.00 of SV_Position matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is dead) Not equal to True)) and ((((Matching unit) belongs to an ally of (Owner of SV_Caster)) Not equal to True) and (((Matching unit)
Unit Group - Pick every unit in SV_DamageGroup1 and do (Actions)
Loop - Actions
Unit - Cause SV_Caster to damage (Picked unit), dealing 20.00 damage of attack type Spells and damage type Magic
Custom script: call DestroyGroup (udg_SV_DamageGroup1)
The above is only example, kinda messy. What are the pros and cons of those above method, which is better for saving space, easy modification and easy making ? Hope you all will give your oppinions, please and thank you.