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

Passive Bladestorm spell?

Status
Not open for further replies.
Level 3
Joined
Nov 23, 2005
Messages
32
I'm trying to create a spell that has a % chance to cast Bladestorm for X second.
The problem is that I can't figure out what to do, to make the spell do this effect.

Explanation of How to make custom passive ability with % chance of activate would be really cool.
 
Level 6
Joined
Mar 2, 2006
Messages
306
you just asked five things at once.

i'll take the first half of your problem, somebody else will take the second (or i will in a day or two)...

preparations:
make a dummy custom spell (passive). for example make a copy of attribute bonus, set all bonuses to 0 on all levels, choose an icon and write tooltips. let's say you called it MyPassiveAbility...

events and conditions

example 1: unit has 7 / 11 / 17% chance to do something when it is attacked by enemy units:

  • Events
    • Unit - A unit is atacked [color=blue](generic unit event)[/color]
  • Conditions
    • Level of MyPassiveAbility for (Attacked Unit) greater than 0 [color=blue](<-only true for units that have the ability)[/color]
  • Actions
    • Set Temp1 = 7 [color=blue](chance for level 1)[/color]
    • If Level of MyPassiveAbility for (Attacked Unit) equals 2
      • Then - Actions
        • Set Temp1 = 11
    • If Level of MyPassiveAbility for (Attacked Unit) equals 3
      • Then - Actions
        • Set Temp1 = 17
    • Set Temp2 = Random integer between 1 and 100 [color=blue](look under 'math')[/color]
    • If Temp2 less then or equal to Temp1
      • Then - Actions
        • [color=red][i](do the spell thingy here)[/i][/color]
percent chance is the simplest thing up there - you just say "Set R = Random integer between 1 and 100". there is 15% chance that R<=15, 16% chance that R<=16 and so on...

example 2: unit has 8 / 11 / 14% chance to do something when it attacks an enemy unit:

  • Events
    • Unit - A unit is atacked [color=blue](generic unit event)[/color]
  • Conditions
    • Level of MyPassiveAbility for (Attack[b]ing[/b] Unit) greater than 0 [color=blue](<-only true for units that have the ability)[/color]
  • Actions
    • Set Temp1 = 5 + 3 * (Level of MyPassiveAbility for Attacking Unit) [color=blue](chance for any level in one move)[/color]
    • Set Temp2 = Random integer between 1 and 100 [color=blue](there is always this part)[/color]
    • If Temp2 less then or equal to Temp1
      • Then - Actions
        • [color=red][i](do the spell thingy here)[/i][/color]
now how to do the bladestorm thingy? that is for some other lesson as i gotta run...

p.s. (to others:) guys don't make this into yet another "omg, he used the unit-is-attacked event"... there are places he can read about that later.
 
Level 3
Joined
Nov 23, 2005
Messages
32
Well, the explanation was how about to make the bladestorm thingy.. and btw, the variable TempX doesn't tell me what is that variable name.. =)
Thanks anyway for this post, i'll bookmark it. +rep =)..
Still need an answer for the bladestorm thingy.
It's kinda like Axe in Dota, but you must attack to make bladestorm activate
 
Status
Not open for further replies.
Top