- Joined
- Dec 17, 2007
- Messages
- 431
Hey, I have made lots of spells now, but this one really anoyes me. It's called firewall and look's awesome in-game.. BUT, it lags like hell, my fps starts on 60. When casted once, it drops to 50, second time casted, it drops to 40 and so on, untill it's at 5 fps and unplayable.. I could understand it if all these dummy unit's was in-game and in-view and alive at the same time.. But, the lag does not dissapear, not when the dummy's expiration timer is done, or if it's out of view. The lag just stay there :S Please help, what did I do wrong?
Here is the GUI:
Here is the GUI:
-
FireWall
-
Events
-
Unit - A unit owned by Player 1 (Red) Begins casting an ability
-
Unit - A unit owned by Player 2 (Blue) Begins casting an ability
-
Unit - A unit owned by Player 3 (Teal) Begins casting an ability
-
Unit - A unit owned by Player 4 (Purple) Begins casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Firewall (Shaman)
-
(Casting unit) Equal to Hero[(Player number of (Owner of (Casting unit)))]
-
-
Actions
-
-------- Set Variables --------
-
Set FireWall_Location = (Target point of ability being cast)
-
Set FireWall_Lenght = (Distance between (Position of (Casting unit)) and FireWall_Location)
-
Set FireWall_Angle = -30.00
-
-------- Create Units --------
-
For each (Integer A) from 1 to 8, do (Actions)
-
Loop - Actions
-
Unit - Create 1 Dummy (FireWall) for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by FireWall_Lenght towards (FireWall_Angle + (Angle from (Position of (Casting unit)) to FireWall_Location)) degrees) facing (Position of (Triggering unit))
-
Unit - Set the custom value of (Last created unit) to (Level of Firewall (Shaman) for (Casting unit))
-
Unit - Add a 8.00 second Generic expiration timer to (Last created unit)
-
Set FireWall_Angle = (FireWall_Angle + 7.50)
-
-
-
-------- Remove Leaks --------
-
Custom script: call RemoveLocation (udg_FireWall_Location)
-
-