Warcraft III resources & community, 2003–2006 · archived

Ability Help plz!

14 posts
#1

Ability Help plz!

hey this is an other ability i was trying to start, but i havent had any luck for it, basically it has a % chance when struck to create a mirror image of the blademaster, this image will then right away cast bladestorm on the spot without moving, damaging every unit withing the area( of course the image has a timed life) but i really havent been able to accomodate the % properties into the trigger. if some one could help it will be greatly appreciated.
#2
Well for a percent chance for it to activate just use an integer comparison, If random number between 1-10 is less than or equal to x(amount percent you want, 5 gives 50%, 7 gives 70%)
#3
k cool thx ill try that
#4
hey what if i want it to be 15%??? what do i enter?
#5
also one more thing to ask, is how would i ristrict the ammount of units created by my trigger? for example, if i have

Event
a unit is attacked

Unit - Create 1 (unit) for (Owner of (Attacked unit)) at (Position of (Attacked unit)) facing Default building facing degrees

and i want to restrict the ammount of dummy units created when the hero is attacked to 6 max, how would i do it?
#6
For 15, make it random integer between 1-100, then set 15 and below.

I dunno how to limit triggered units, so that one you'll have to ask someone for.
#7
ok cool, now just the limit :P, can any one tell me how to use limits in a trigger?? also can some one tell me how to make it so that if a unit stops the effect of an ability( a channeling ability) the whole creation of units and the effect of the ability (triggerd) can be stopped?
#8
Um you want it to stop its effect when the number of dummies reaches 6? if I understand what you want correctly then just do some kind of deal where each time it creates a new dummy set a variable(integer type) +1, and an if then else where if the variable is under 6 then create more else destroy dummies and just cancel any effects of the spell
#9
oh, sry i shud be more clear next time, what i ment was can i make an ability stop its effect if the hero stops casting it? for example if the litch casts death and decay, then all of a sudden stops, the effect of death and decay will stop. this is wat i wanna do for my chanelling spells.
#10
why not do this
maybe add it to the trigger you already have.

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of living Mirror Image Bladestorm units owned by Owner of Attacking Unit) Less than 6
Then - Actions
(The actions you want here)
Else - Actions
Do nothing
#11
DemonHunterSXoh, sry i shud be more clear next time, what i ment was can i make an ability stop its effect if the hero stops casting it? for example if the litch casts death and decay, then all of a sudden stops, the effect of death and decay will stop. this is wat i wanna do for my chanelling spells.


Make two trigger for one channel spell:

1. channel
Events
Unit Begins channeling an ability
Conditions
Ability being cast equal to xxx
Action
set variable IS_CHANNEL = true
//this is just example//
For loop 1 to 15
IF IS_CHANNEL = true then
- Create dummy unit
- Add expiration timer
- order dummy to do something
- Wait 1 sec.
//end of example//

2. channel off
Events
Unit stops casting an ability
Conditions
Ability being cast equal to xxx
Action
set variable IS_CHANNEL = false

So, when unit stops channeling, variable IS_CHANNEL will become false, and he will no longer create dummy unit to do something.

Next time he cast the ability again, the variable will become true again, then false, true, false , and so on.. ( That's the tru/false flag method)
#12
hey what exactly does the "for loop 1 to 15 mean?
#13
For each Integer A... blabla.
#14
demonsofdantehey what exactly does the "for loop 1 to 15 mean?


it means the hero will channel for about 15 second, since each loop has wait 1 sec. long.