ChickenWithOkra
New Member
- Reaction score
- 0
I got this Eclipse template which i tried to edit, as far as i know, it works properly, but I don't know how to make it MUI.
Here's the code:
Edit: Added some missing code.
Credits by: Exide
Here's the code:
Trigger:
- Init
- Events
- Map initialization
- Conditions
- Actions
- Hashtable - Create a hashtable
- Set EclipseHashtable = (Last created hashtable)
- Hashtable - Save 5.40 as 0 of 0 in EclipseHashtable
- Events
Trigger:
- Eclipse
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- Actions
- Trigger - Add to Add Unit <gen> the event (Unit - A unit comes within 512.00 of EclipseCaster)
- Set Eclipse = True
- Set EclipseCaster = (Triggering unit)
- Set EclipsePoint = (Position of (Triggering unit))
- Set EclipseGroup = (Units within 512.00 of EclipsePoint matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
- Set EclipseTimer = (Load 0 of 0 from EclipseHashtable)
- Unit Group - Pick every unit in EclipseGroup and do (Actions)
- Loop - Actions
- Unit - Set the custom value of (Picked unit) to 0
- Loop - Actions
- For each (Integer A) from 1 to ((Level of Breath of Fire (Neutral Hostile) (Neutral Hostile) for (Triggering unit)) x (2 + 2)), do (Actions)
- Loop - Actions
- Set EclipseTarget = (Random unit from EclipseGroup)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Custom value of EclipseTarget) Greater than or equal to 4
- Then - Actions
- Unit Group - Remove EclipseTarget from EclipseGroup
- Set EclipseTarget = (Random unit from EclipseGroup)
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EclipseTimer Greater than 0.00
- Then - Actions
- Set EclipseTimer = (EclipseTimer - 0.45)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (EclipseGroup is empty) Equal to True
- Then - Actions
- Special Effect - Create a special effect at ((Position of (Triggering unit)) offset by (Random real number between 300.00 and 512.00) towards (Random angle) degrees) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Else - Actions
- If - Conditions
- Special Effect - Create a special effect attached to the origin of EclipseTarget using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Unit - Cause (Triggering unit) to damage EclipseTarget, dealing ((Real((Level of Eclipse (Neutral Hostile 1) (Neutral Hostile 1) for (Triggering unit)))) x 100.00) damage of attack type Spells and damage type Divine
- Unit - Set the custom value of EclipseTarget to ((Custom value of EclipseTarget) + 1)
- Wait 0.45 seconds
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (EclipseTarget is dead) Equal to True
- Then - Actions
- Unit Group - Remove EclipseTarget from EclipseGroup
- Else - Actions
- If - Conditions
- Else - Actions
- Hashtable - Clear all child hashtables of child 0 in EclipseHashtable
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Loop - Actions
- Custom script: call DestroyGroup(udg_EclipseGroup)
- Custom script: call RemoveLocation(udg_EclipsePoint)
- Set Eclipse = False
- Events
Trigger:
- Add Unit
- Events
- Conditions
- ((Triggering unit) belongs to an enemy of (Owner of EclipseCaster)) Equal to True
- Eclipse Equal to True
- Actions
- Unit Group - Add (Triggering unit) to EclipseGroup
Edit: Added some missing code.
Credits by: Exide
Last edited: