HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

new question

09-27-2007, 08:31 AM#1
zetanno
I'm working at a map and i want to put on hit acts.Something like:8% chance to cast Blizzard when strikes .i don't know how to do this .Can you help me?
09-27-2007, 08:56 AM#2
The Elite
Trigger:
Chance to do actions
Collapse Events
Unit - A unit Is attacked
Conditions
Collapse Actions
Set Random_Num = (Random integer number between 1 and 10)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random_Num Equal to 1
Collapse Then - Actions
-------- your actions --------
Else - Actions
should do it with a 10% chance
09-27-2007, 09:20 PM#3
Anopob
Um, how is that 8%? Well okay it is 10% but if you want 8% do Random_Num = 1 to 100 and do Random_Num Less than 9.
09-27-2007, 09:50 PM#4
Ignitedstar
Random_Num Less than or equal to 8 works, too.

I think the reason why The_Elite said 10% was because it's a much "cleaner" chance. But-hey, whatever suits your fancy.
09-27-2007, 10:34 PM#5
cohadar
Quote:
Originally Posted by Ignitedstar
Random_Num Less than or equal to 8 works, too.

I think the reason why The_Elite said 10% was because it's a much "cleaner" chance. But-hey, whatever suits your fancy.

loool, "cleaner" chances are 50%, 25%, 12.5%, 6.25%, 3.125%....

or if translated to binary

0.1 , 0.01 , 0.001 , 0.0001 , 0.00001 ...

stupid humans and their decimal system...
09-27-2007, 10:43 PM#6
Dil999
That wont work. You can spam attack+stop to run it over and over. You will need to use jass if you want it to work correctly.
09-30-2007, 09:13 AM#7
zetanno
thx very much . will use that in my map +REP