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

help with spell

Status
Not open for further replies.
Level 3
Joined
Mar 30, 2008
Messages
26
ive got a spell that works fine by i want to make it so it has a crit chance here it is

Unit - A unit Begins casting an ability

(Ability being cast) Equal to Execute
Unit - Add Crow Form to (Casting unit)
Unit - Remove Crow Form from (Casting unit)
Animation - Change (Casting unit) flying height to 200.00 at 1000.00
Wait 0.01 seconds
Animation - Change (Casting unit) flying height to 0.00 at 1000.00

can some one please help me!!
 
Level 8
Joined
Mar 23, 2007
Messages
302
u need a Variable Real or Integer (*caugth* learn jass *caugth*)
i hope the unit that uses this ability is unique
or we have a problem making this MUI = Multiple Usable I... (I is whatever.)

ok create a variable (name it crit, set it Integer), set it in the beginning of the ability to a random vaule(0 - 99).
then check for the condition like:
if crit > (your chance,lets say 25 ) then
give the unit a 100% critical chance OR do Y damage to target Area.

And ofc More Information => better solutions
 
Level 8
Joined
Mar 23, 2007
Messages
302
i dont have an idea what the Gui functions are but it
was somthing with Set 'Variable' to somthing.
u insert this with somthing like this:
Set crit to RandomIntegerbetween(0 and 99)
then do a IF THEN ELSE thingy.
IF crit is smaller then 25
THEN (do your give your unit a 100% critical strike)
Wait a bit
Remove the 100% critical ability
Else Nothign.

i can help u with the logic, could do it in Jass(but dont have time sry)
so i hope some GUI-Expert will help u out.:spell_breaker:
gl
 
Status
Not open for further replies.
Top