- Joined
- Jun 5, 2006
- Messages
- 11
EDIT
---------------------------------
Okay ive figured out how to make it work, BUT i need some1 to tell me if is there a way to shorten my spell... I think its a kinda long... If yes would you please reply in here or to add me to MSN : [email protected] Tx to you all!
BTW Searching one of the best way of knowledge XD
---------------------------------
Original Post :
Hello
I've started studying how to create spell ( not in JASS ) and i wanted to create a spell which would attack at first my main target... And from this target it would cast Two chain lightning ( any number of target ~ 3 ) targetting at random... I tryed many way but noone are okay...
Right now i have this made ...
LightMaker
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Light Maker
Actions
Unit - Create 1 Dummy for (Triggering player) at (Target point of ability being cast) facing 0.00 degrees
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
If ((Level of Light Maker for (Triggering unit)) Equal to 1) then do (Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from (Units within 5000.00 of (Position of (Last created unit))))) else do (Do nothing)
Btw i know that 5s is TOO MUCH... it was for some random testing ... but should i put it to 1.00 or 0.50...
And i know that 5000 range is BIG but no unit are anywhere in the map... was only for testing.
I hope you guys can help me ... Tx.
EDIT
------------------------------------
okay i worked on it... It goes better tough... Sometime when i cast my spell only 1 chain goes out , sometime 2 and sometime 3... My trigger now goes like that :
LightMaker
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Light Maker
Actions
Set LightMakerTarget = (Target point of ability being cast)
For each (Integer A) from 1 to 3, do (Actions)
Loop - Actions
Unit - Create 1 Dummy for (Triggering player) at LightMakerTarget facing 0.00 degrees
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
If ((Level of Light Maker for (Triggering unit)) Equal to 1) then do (Unit - Add Light Maker - Lighning to (Last created unit)) else do (Do nothing)
Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Random unit from (Units within 70000.00 of (Position of (Last created unit))))
I used a var but im not sure if i should.. I used it since I think the target will change cause my dummies are casting ChainLight on diferent target ... So do the target change?
btw, in my dummy spell i set the duration to 0.01, 7k range to test it out and my ChainLightning spell is to 0.01 duration with my number of target -no manacost for my dummies- neither cooldown and area of effect of 1000....
So I realized that the REAL PROBLEM is that my Dummies dont cast... Shall i put a wait/pause somewhere?? do I made an action before another that should be after? ...
Waiting your answers, Tx.
---------------------------------
Okay ive figured out how to make it work, BUT i need some1 to tell me if is there a way to shorten my spell... I think its a kinda long... If yes would you please reply in here or to add me to MSN : [email protected] Tx to you all!
BTW Searching one of the best way of knowledge XD
---------------------------------
Original Post :
Hello
I've started studying how to create spell ( not in JASS ) and i wanted to create a spell which would attack at first my main target... And from this target it would cast Two chain lightning ( any number of target ~ 3 ) targetting at random... I tryed many way but noone are okay...
Right now i have this made ...
LightMaker
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Light Maker
Actions
Unit - Create 1 Dummy for (Triggering player) at (Target point of ability being cast) facing 0.00 degrees
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
If ((Level of Light Maker for (Triggering unit)) Equal to 1) then do (Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from (Units within 5000.00 of (Position of (Last created unit))))) else do (Do nothing)
Btw i know that 5s is TOO MUCH... it was for some random testing ... but should i put it to 1.00 or 0.50...
And i know that 5000 range is BIG but no unit are anywhere in the map... was only for testing.
I hope you guys can help me ... Tx.
EDIT
------------------------------------
okay i worked on it... It goes better tough... Sometime when i cast my spell only 1 chain goes out , sometime 2 and sometime 3... My trigger now goes like that :
LightMaker
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Light Maker
Actions
Set LightMakerTarget = (Target point of ability being cast)
For each (Integer A) from 1 to 3, do (Actions)
Loop - Actions
Unit - Create 1 Dummy for (Triggering player) at LightMakerTarget facing 0.00 degrees
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
If ((Level of Light Maker for (Triggering unit)) Equal to 1) then do (Unit - Add Light Maker - Lighning to (Last created unit)) else do (Do nothing)
Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Random unit from (Units within 70000.00 of (Position of (Last created unit))))
I used a var but im not sure if i should.. I used it since I think the target will change cause my dummies are casting ChainLight on diferent target ... So do the target change?
btw, in my dummy spell i set the duration to 0.01, 7k range to test it out and my ChainLightning spell is to 0.01 duration with my number of target -no manacost for my dummies- neither cooldown and area of effect of 1000....
So I realized that the REAL PROBLEM is that my Dummies dont cast... Shall i put a wait/pause somewhere?? do I made an action before another that should be after? ...
Waiting your answers, Tx.