Magazette2
New Member
- Reaction score
- 3
Ive recetnly added 4 trigger spells to my map and it is now lagging alot, could somebody please help me out
Omnislash
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Omnislash
Actions
Set o = (Triggering unit)
Set t = (Target unit of ability being cast)
Set tl = (Position of t)
If ((Level of Night:Time:Warp for o) Equal to 1) then do (Set loops_intager = 12) else do (Do nothing)
If ((Level of Night:Time:Warp for o) Equal to 2) then do (Set loops_intager = 25) else do (Do nothing)
Unit - Make o Invulnerable
Animation - Change o's vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
Selection - Remove o from selection
Unit - Move o instantly to tl
Custom script: call RemoveLocation(udg_tl)
Animation - Play o's attack animation
Unit - Cause o to damage t, dealing (Random real number between 240.00 and 520.00) damage of attack type Hero and damage type Normal
Special Effect - Create a special effect attached to the chest of o using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
Special Effect - Destroy (Last created special effect)
For each (Integer A) from 1 to loops_intager, do (Actions)
Loop - Actions
Wait 0.30 game-time seconds
Set o_current_loc = (Position of o)
Set EG[1] = (Units within 1200.00 of o_current_loc matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of o)) Equal to True) and (((Matching unit) is hidden) N
Set EG[2] = (Random 1 units from EG[1])
Custom script: call RemoveLocation(udg_o_current_loc)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in EG[1]) Greater than 0
Then - Actions
Unit Group - Pick every unit in EG[2] and do (Actions)
Loop - Actions
Set p = (Picked unit)
Set pl = (Position of p)
Selection - Remove o from selection
Unit - Move o instantly to pl
Custom script: call RemoveLocation(udg_pl)
Animation - Play o's attack animation
Unit - Cause o to damage p, dealing (Random real number between 500.00 and 800.00) damage of attack type Hero and damage type Normal
Special Effect - Create a special effect attached to the chest of o using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call DestroyGroup(udg_EG[1])
Custom script: call DestroyGroup(udg_EG[2])
Else - Actions
Custom script: call DestroyGroup(udg_EG[1])
Custom script: call DestroyGroup(udg_EG[2])
Selection - Add o to selection for (Owner of o)
Animation - Change o's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
Unit - Make o Vulnerable
Selection - Add o to selection for (Owner of o)
Animation - Change o's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
Unit - Make o Vulnerable
Night Time Metamorphisis level 1
Events
Time - Every 0.02 seconds of game time
Conditions
((In-game time of day) Greater than 10.00) and ((In-game time of day) Less than 20.00)
Actions
Unit Group - Pick every unit in (Units of type Lunaria) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Lycanthrapy Lunar for (Picked unit)) Equal to 1
Then - Actions
Set Hero_level = (Hero level of (Picked unit))
Set Hero_EXP = (Hero experience of (Picked unit))
Set Unholy_Aura_level = (Level of Unholy Aura for (Picked unit))
Set Eclipse_level = (Level of Full Moon for (Picked unit))
Set Feral_spirits_level = (Level of Feral Spirits for (Picked unit))
Set Lycanthrapy = (Level of Lycanthrapy Lunar for (Picked unit))
Set Inventory = (Item carried by (Picked unit) in slot 1)
Set Inventory = (Item carried by (Picked unit) in slot 2)
Unit - Replace (Picked unit) with a Lunaria (Beast) (Level 3) using The new unit's max life and mana
Else - Actions
Night Time Meteamorphisis level 2
level 1 Copy 2
Events
Time - Every 0.02 seconds of game time
Conditions
((In-game time of day) Greater than 10.00) and ((In-game time of day) Less than 20.00)
Actions
Unit Group - Pick every unit in (Units of type Lunaria) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Lycanthrapy Lunar for (Picked unit)) Equal to 2
Then - Actions
Set Hero_level = (Hero level of (Picked unit))
Set Hero_EXP = (Hero experience of (Picked unit))
Set Unholy_Aura_level = (Level of Unholy Aura for (Picked unit))
Set Eclipse_level = (Level of Full Moon for (Picked unit))
Set Feral_spirits_level = (Level of Feral Spirits for (Picked unit))
Set Lycanthrapy = (Level of Lycanthrapy Lunar for (Picked unit))
Set Inventory = (Item carried by (Picked unit) in slot 1)
Set Inventory = Inventory2
Unit - Replace (Picked unit) with a Lunaria (Monstrosity) (Level 3) using The new unit's max life and mana
Else - Actions
Making Night Time Metamorphisis to come back to original form afterwards
level 1 Copy
Events
Time - Every 2.00 seconds of game time
Conditions
((In-game time of day) Greater than 0.00) and ((In-game time of day) Less than 10.00)
Actions
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Lycanthrapy-Wolf (Neutral Hostile) for (Picked unit)) Equal to 1
Then - Actions
Unit - Replace (Picked unit) with a Lunaria using The new unit's max life and mana
Hero - Set (Last replaced unit) Hero-level to Hero_level, Hide level-up graphics
Hero - Set (Last replaced unit) experience to Hero_EXP, Hide level-up graphics
Unit - Set level of Unholy Aura for (Picked unit) to Unholy_Aura_level
Unit - Set level of Feral Spirits for (Picked unit) to Feral_spirits_level
Unit - Set level of Lycanthrapy Lunar for (Picked unit) to Lycanthrapy
Unit - Set level of Full Moon for (Picked unit) to Eclipse_level
Hero - Give Inventory to (Picked unit)
Hero - Give Inventory2 to (Picked unit)
Else - Actions
NightTimeWarp level 1
level 1 Copy 3
Events
Time - Every 20.00 seconds of game time
Conditions
((In-game time of day) Greater than 10.00) and ((In-game time of day) Less than 20.00)
Actions
Unit Group - Pick every unit in (Units of type Tichondrius) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Night:Time:Warp for (Picked unit)) Equal to 2
Then - Actions
Set Vampiric_Level = (Hero level of (Picked unit))
Set Vampiric_EXP = (Hero experience of (Picked unit))
Set Vampiric_touch_level = (Level of Vampiric Touch for (Picked unit))
Set Vampiric_Aura_level = (Level of Vampiric Aura for (Picked unit))
Set Moon_Walk_Level = (Level of Moon Walk for (Picked unit))
Set NighTimeWarp = (Level of Night:Time:Warp for (Picked unit))
Set Vampiric_Hp = (Percentage life of (Picked unit))
Set Vampiric_Hp = (Percentage mana of (Picked unit))
Else - Actions
NightTimeWarp level 2
level 1 Copy 3 Copy
Events
Time - Every 10.00 seconds of game time
Conditions
((In-game time of day) Greater than 10.00) and ((In-game time of day) Less than 20.00)
Actions
Unit Group - Pick every unit in (Units of type Tichondrius) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Night:Time:Warp for (Picked unit)) Equal to 1
Then - Actions
Set Vampiric_Level = (Hero level of (Picked unit))
Set Vampiric_EXP = (Hero experience of (Picked unit))
Set Vampiric_touch_level = (Level of Vampiric Touch for (Picked unit))
Set Vampiric_Aura_level = (Level of Vampiric Aura for (Picked unit))
Set Moon_Walk_Level = (Level of Moon Walk for (Picked unit))
Set NighTimeWarp = (Level of Night:Time:Warp for (Picked unit))
Set Vampiric_Hp = (Percentage life of (Picked unit))
Set Vampiric_Hp = (Percentage mana of (Picked unit))
Else - Actions
SettingNightTimeWarp
level 1 Copy 3 Copy Copy
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Night:Time:Warp
Actions
Hero - Set (Casting unit) Hero-level to Vampiric_Level, Hide level-up graphics
Hero - Set (Casting unit) experience to Vampiric_EXP, Hide level-up graphics
Unit - Set life of (Casting unit) to Vampiric_Hp
Unit - Set mana of (Casting unit) to Vampiric_Mana
Unit - Set level of Moon Walk for (Casting unit) to Moon_Walk_Level
Unit - Set level of Vampiric Aura for (Casting unit) to Vampiric_Aura_level
Unit - Set level of Vampiric Touch for (Casting unit) to Vampiric_touch_level
Unit - Set level of Night:Time:Warp for (Casting unit) to NighTimeWarp
Freezing Field Setup
Frozen Field Setup
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Frozen Field (Starfall)
Actions
Set CasterPlayer = (Owner of (Triggering unit))
Set CasterPosition = (Position of (Triggering unit))
Trigger - Turn on Frozen Field I <gen>
Wait 0.10 seconds
Trigger - Turn on Frozen Field II <gen>
Freezing field blasts far away
Frozen Field I
Events
Time - Every 0.20 seconds of game time
Conditions
Actions
Unit - Create 1 Ice Explosion (Caster Unit) for CasterPlayer at (CasterPosition offset by (Random real number between 450.00 and 800.00) towards (Random angle) degrees) facing Default building facing degrees
Set IceCaster1 = (Last created unit)
Unit - Order IceCaster1 to Undead Lich - Frost Nova IceCaster1
Freezing field blasts close
Frozen Field II
Events
Time - Every 0.20 seconds of game time
Conditions
Actions
Unit - Create 1 Ice Explosion (Caster Unit) for CasterPlayer at (CasterPosition offset by (Random real number between 100.00 and 450.00) towards (Random angle) degrees) facing Default building facing degrees
Set IceCaster2 = (Last created unit)
Unit - Order IceCaster2 to Undead Lich - Frost Nova IceCaster2
Stop Freezing Field If Channelling stops
Events
Unit - A unit Stops casting an ability
Conditions
(Ability being cast) Equal to Godly Gold
Actions
Trigger - Turn off Frozen Field I <gen>
Trigger - Turn off Frozen Field II <gen>
Post the code, please. It's probably full of leaks.
and
and a
Map initialization
Events
Map initialization
Conditions
Actions
Melee Game - Use melee time of day (for all players)
Melee Game - Limit Heroes to 1 per Hero-type (for all players)
Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
Melee Game - Set starting resources (for all players)
Melee Game - Remove creeps and critters from used start locations (for all players)
Melee Game - Create starting units (for all players)
Melee Game - Run melee AI scripts (for computer players)
Melee Game - Enforce victory/defeat conditions (for all players)