• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

need help with a spell

Status
Not open for further replies.
Level 3
Joined
Sep 14, 2007
Messages
43
I want to create a spell that sends multiply missiles to an area location.
each missile hits a random enemy in that location damage him and creats an explosion that deals area damage.
i want some of the missiles to appear on the screen on the same time.

this is what i want to do:
create a dummy unit that will cast dummy spells on a number of random units from a total group, but i also want an explosion to occur after a unit is being hit and i dont really know how to do that :)

now i know it might be easy to do for some of you, but i dont want to create this spell by copy-paste, so plz dont send me a full code you made, just try to explain in words.
 
Level 5
Joined
Jan 15, 2007
Messages
199
set a group to the units in an area
you can use a condition in the GroupEnum or an if statement in the loop to filter out units you don't want
then loop through it creating a dummy unit and using IssueTargetOrder to cast the spell, add an expiration timer to the dummies and clean up leaks
 
Level 3
Joined
Sep 14, 2007
Messages
43
yes thanks, but thats the part i already know :D
what i dont know is how to set an explosion exactly when the unit is being hit by the spell (its a missile homing spell so the unit wont get hit exactly after i cast the spell)

and i want some of the missiles to fly on the same time and not one by one so that means i will have 2 or more explosions that are needed to be deleted on the same time (do i need to use an array for those explosions or there is some other smarted way to delete them?)
 
Level 3
Joined
Sep 14, 2007
Messages
43
actually i never asked anyone to make me a jass spell.
i even asked players clearly not to send me full codes but to try to explain with words.
so i dont really understand whats the problem.

@SerraAvenger: thanks for making my life easier, but how do i force a normal unit to cast a hero spell and is it even possible?
because i want each energy ball to become stronger and hit more units with each lvl.
 
Level 6
Joined
Apr 16, 2007
Messages
177
@SerraAvenger: thanks for making my life easier, but how do i force a normal unit to cast a hero spell and is it even possible?
because i want each energy ball to become stronger and hit more units with each lvl.

Nothing with hero spell

Simply make a normal spell
set its maximum level to XXX
Make it stronger from level to level
Level up whenever the spell was casted
And then order to cast the order string


If your question was:
-Can normal ( ie Unit- ) spells have multiple levels, too?
The answer is: YES
It is in the same field like with Hero abilities, somewhat like "values or data - maximum level"

Hth, Serra
 
Level 3
Joined
Sep 14, 2007
Messages
43
@SerraAvenger: thanks alot :D
i didnt know that normal spells can have levels.
so what i need to do is to change the level of the spell of the dumy unit according to the true spell via jass code?

@Just_Spectating: so what you mean is that i can make the units shoot instead of making a dummy spell? if the dummy unit has the ability locust can it still shoot other enemies?
Another this is that i want an explosion effect to be created everytime a unit is being hit but i'm not sure if i can do this with normal attacks.
 
Status
Not open for further replies.
Top