Warcraft III resources & community, 2003–2006 · archived

Spell Damage Dice

14 posts
#1

Spell Damage Dice

Hi

I am designing a spell which will damage enemy units from 100 (minimum damage) to 300 (maximum) damage. The problem is I don't know how to. My trigger skills are just bad but the rest is exceptional.
#2
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:
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

        
#3
yes!
#4
you was faster than my edit :D so see above
#5
Hmmm, I'm abit confused, abit more details and easier please.
#6
SophoHmmm, 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. :
RaZoRset "therandomnumber" = random real number beetween 1-100

then u can set the percentage of this "random function. :
RaZoRif 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:
RaZoRif/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
#7
the ability is to target a single enemy unit, will it work?
#8
yes, the traget unit of ability being cast refers to a targeted single unit (e.g. using stormbolt as dummy spell)
#9
Yikes, I still don't understand. Can you send me a test map of this?
#10
it took me five minutes to finish this map for u. ply pm me your e-mail adress.
#11
I still haven't recieved the map yet.
Also I have another problem:

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.
#12
this doesn't work, because u haven't a triggering unit after 6 sec. so u have to use variables:
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
#13
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
#14
Thanks RaZoR