• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

BoltLightning -> 2 ChainLight

Status
Not open for further replies.
Level 2
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:D
---------------------------------
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.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
well, make sure that

A) the dummy abil doesnt cost mana, or the dummy HAS mana

B) Units are actually getting picked

C) you're leaking alot, and you are using Position of Last Created Unit ( leak ), instead of just reusing LightMakerTarget xD

D) you're only adding the ability to the dummy if the level of teh hero spell == 1
 
Status
Not open for further replies.
Top