- Joined
- Jul 28, 2013
- Messages
- 768
Hello guys,
I've been told that in order to preload a spell, to avoid lag when the custom spell gets used the first time, you have to place the dummy in the map via WE and in the map initialization trigger you should add the custom spell that the dummy uses to the dummy (no need for the dummy to cast the spell). Then, you can remove the dummy from the game.
This what i did.
This my custom spell.
Another thing, is it Okay that i'm using the same type of dummy for multiple custom spells? (not the same variable in the triggers but the same unit type)
Please let me know what you think guys and if there's something that i should correct.
Thank you.
I've been told that in order to preload a spell, to avoid lag when the custom spell gets used the first time, you have to place the dummy in the map via WE and in the map initialization trigger you should add the custom spell that the dummy uses to the dummy (no need for the dummy to cast the spell). Then, you can remove the dummy from the game.
This what i did.
-
Initialisation Map
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Unit - Add DummySpell1 to Dummy 0071 <gen>
-
Unit - Add DummySpell2 to Dummy 0071 <gen>
-
Unit - Remove Dummy 0071 <gen> from the game
-
-
This my custom spell.
-
DP Config
-
Events
-
Time - Elapsed game time is 0.01 seconds
-
-
Conditions
-
Actions
-
-------- Dummy unit type --------
-
Set DP_Dummy = Dummy
-
-------- Ability that triggers the whole spell --------
-
Set DP_Ability = HeroSpell
-
-------- Ability that the dummy uses --------
-
Set DP_DBuffAbil = DummySpell
-
-
-
DP Cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to DP_Ability
-
-
Actions
-
Set TempPointDP = (Position of (Casting unit))
-
Unit - Create 1 DP_Dummy for Neutral Passive at TempPointDP facing Default building facing degrees
-
Set TempDummyDP = (Last created unit)
-
Unit - Add DP_DBuffAbil to TempDummyDP
-
Unit - Order TempDummyDP to Neutral Fire Lord - Soul Burn (Casting unit)
-
Unit - Add a 1.00 second Generic expiration timer to TempDummyDP
-
Custom script: call RemoveLocation (udg_TempPointDP)
-
-
Another thing, is it Okay that i'm using the same type of dummy for multiple custom spells? (not the same variable in the triggers but the same unit type)
Please let me know what you think guys and if there's something that i should correct.
Thank you.