• 🏆 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!

Random Spell Help

Status
Not open for further replies.
Level 1
Joined
Sep 14, 2006
Messages
2
ok, thanks in advance for the help

but i am seriously lost on how to do a spell like this, i want to make a spell that when used it gives you a random spell (this is going to be the special for a hero, and in the end it gives you random spells each time) what i want is for it to give one of the spells i choose at random each time the spell is used and then it goes back to random after the cooldown is over.

would anyone know how to do that?
 
Level 1
Joined
Sep 14, 2006
Messages
2
Ehhh i tried that... but it didnt exactly work, the tome of retraining doesnt really do what im trying to get the spell to do
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
(you need a global integer variable named int)

Events
Unit - A Unit Starts the Effect of an Ability
Conditions
Ability Being Cast Equal to XXX
Actions
Set int = Random Number between 0 and (number of skills)
Remove (rand1) from triggering unit
remove (rand2) from triggering unit
etc, etc
If int = 0 then
Add (rand1) to Triggering Unit
Else
If int = 1 then
Add (rand2) to Triggering Unit
etc, etc
 
Status
Not open for further replies.
Top