Malice-
Endlessly Known
- Reaction score
- 34
Okay, so i've been experiencing the lag spikes in my map, mainly when a hero is picked (its a hero arena type map) and when one of the runes are acquired. Basically, when I pick up a rune, the game freezes for a SPLIT second, and when a hero is picked, the game freezes for a SPLIT second. Its kind of annoying.
Here are the triggers:
The hero pick trigger: Basically all it does is, well, what you see there. The actually spawning of the hero is done by the player clicking it in the tavern, and the tavern selling it.
The rune pickup trigger: A unit picks up a rune, and he gets those abilities for 15 seconds. The variable is to allow the unit to walk on the 'lava'.
Any ideas on how to fix the spikes?
Here are the triggers:
The hero pick trigger: Basically all it does is, well, what you see there. The actually spawning of the hero is done by the player clicking it in the tavern, and the tavern selling it.
Code:
Manual Hero Pick
Events
Unit - A unit Sells a unit
Conditions
((Sold unit) is A Hero) Equal to True
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by (Picked player)
Game - Display to (All players) the text: (A player has chosen + (Name of (Sold unit)))
Wait 0.10 seconds
Selection - Select (Sold unit) for (Owner of (Sold unit))
Set Hero[(Player number of (Owner of (Sold unit)))] = (Sold unit)
Player - Add 750 to (Owner of (Sold unit)) Current gold
The rune pickup trigger: A unit picks up a rune, and he gets those abilities for 15 seconds. The variable is to allow the unit to walk on the 'lava'.
Code:
Blazing Speed Effect
Events
Unit - A unit Acquires an item
Conditions
(Item-type of (Item being manipulated)) Equal to Rune of Blazing Speed
Actions
Set FireRune[(Player number of (Owner of (Hero manipulating item)))] = True
Unit - Add Rune Fire Attack to (Hero manipulating item)
Unit - Add Rune Attack Speed (Greater) to (Hero manipulating item)
Game - Display to (All players) the text: (PlayerNames[(Player number of (Owner of (Hero manipulating item)))] + |cffFF4500has aquired a FIRE RUNE! He is blazing fast and can walk on lava! Watch out!|r)
Wait 15.00 seconds
Unit - Remove Rune Attack Speed (Greater) from (Triggering unit)
Unit - Remove Rune Fire Attack from (Triggering unit)
Set FireRune[(Player number of (Owner of (Hero manipulating item)))] = False
Any ideas on how to fix the spikes?