• 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.

Spell Damage Dice

Status
Not open for further replies.
Level 7
Joined
Mar 26, 2004
Messages
350
do u want to have a random damage between 100 - 300?

then create a real variable (called therandomnumber or sth. like that) and attach these function to your trigger:
Code:
event: - your ability event
condition: - your condition
action: set "therandomnumber" = random real number beetween 1-100
if/then/else multiple functions:
   if condition: "therandomnumber" smaller than 33 
   if action: set taret unit of ability being cast' s life to life of taret unit of ability being cast - 100
if/then/else multiple functions:
   if condition: and:
          "therandomnumber" greater than or equal to 33
          "therandomnumber" smaller than 66
    if action: set taret unit of ability being cast' s life to life of taret unit of ability being cast - 200
if/then/else multiple functions:
   if condition: and:
          "therandomnumber" greater than or equal to 66
          "therandomnumber" smaller than or equal to 100
    if action: set taret unit of ability being cast' s life to life of taret unit of ability being cast - 300
 
Level 7
Joined
Mar 26, 2004
Messages
350
Sopho said:
Hmmm, I'm abit confused, abit more details and easier please.
k :D . as there is no "random" function, u have to create an own. this can u do by creating a real variable, and set this variable to a random number each time the event is started. :
RaZoR said:
set "therandomnumber" = random real number beetween 1-100
then u can set the percentage of this "random function. :
RaZoR said:
if condition: "therandomnumber" smaller than 33
if action: set taret unit of ability being cast' s life to life of taret unit of ability being cast - 100
this means, that to 33% the targeted unit looses 100 hp and to 67% nothing will happen.so u need the other if/then/else functions:
RaZoR said:
if/then/else multiple functions:
if condition: and:
"therandomnumber" greater than or equal to 33
"therandomnumber" smaller than 66
if action: set taret unit of ability being cast' s life to life of taret unit of ability being cast - 200
if/then/else multiple functions:
if condition: and:
"therandomnumber" greater than or equal to 66
"therandomnumber" smaller than or equal to 100
if action: set taret unit of ability being cast' s life to life of taret unit of ability being cast - 300
so the targeted unit of your ability will loose to 33% 100, to 33% 200 and to 33% 300 hp.
i hope u understand it now better :D
 
Level 7
Joined
Mar 26, 2004
Messages
350
yes, the traget unit of ability being cast refers to a targeted single unit (e.g. using stormbolt as dummy spell)
 
Level 7
Joined
Mar 26, 2004
Messages
350
it took me five minutes to finish this map for u. ply pm me your e-mail adress.
 
Level 21
Joined
Feb 14, 2004
Messages
3,311
I still haven't recieved the map yet.
Also I have another problem:

Code:
Unit - A unit Begins casting an ability

(Ability being cast) Equal to Firebolt

 Actions
    Animation - Change (Target unit of ability being cast)'s vertex coloring to (100.00%, 25.00%, 25.00%) with 0.00% transparency
    Wait 6.00 seconds
    Animation - Change (Target unit of ability being cast)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency


What I basically want is the unit which is targeted by the spell " fire " to turn red and then back to normal colour (as you can see) after 6 seconds. But it won't work.
 
Level 7
Joined
Mar 26, 2004
Messages
350
this doesn't work, because u haven't a triggering unit after 6 sec. so u have to use variables:
Code:
set "unitvariable" = targeted unit"
Animation - Change ("unitvariable")'s vertex coloring to (100.00%, 25.00%, 25.00%) with 0.00% transparency 
    Wait 6.00 seconds 
    Animation - Change ("unitvariable")'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency

this will work
 
Level 5
Joined
Jun 21, 2004
Messages
129
I have a very simple way of making this spell that uses triggers(if you don't mind seeing the spell damage amount)
All you got to do is make a unit and set its attack range to what you want then give it a 100% critical strike ability and then when the spell is cast create the unit at the target and have it at him. For a mass damage one just create the unit at each of the enemy units in range. I have alrdy made a spell that shows this with the Drunk Panda found here http://www.wc3sear.ch/index.php?p=Spells&ID=196&sid=727787a25bacddd6c41fcd748aa72ac3
 
Status
Not open for further replies.
Top