| 12-31-2005, 10:17 PM | #1 |
I was wondering if it is possible to have "Spell Channeling" like in the original WC1/WC2 and WoW. i.e. I want RoF to be a channeled spell. Every second spent casting, it depletes 10% mana of the caster while dealing 5 damage per second and lasts for 10 seconds. If it is interrupted the mana won't be spent anymore. Is there an easy way to do this? i.e. I'm an idiot and cannot handle arrays (I use the tft version of world editor and it seems very few tutorials use the actual tft world editor), and if there is no point and click option on doing this then it will just be easier for me to halve the casting time/max damage/mana spent than to create this effect. I've already spent a full day getting the summoning spell to work on a mana point basis and don't feel like doing that again. tyvm !:D Kevin [email protected] |
| 12-31-2005, 10:23 PM | #2 |
loop until stops casting an ability. - each period of time reduce the unit's mana by X - If unit's mana is less than or equal to 0 , then pause the unit, order it to stop and unpause the unit |
| 12-31-2005, 10:27 PM | #3 | |
Quote:
Ok I think I almost udnerstand ths. I will try to create a new set of triggers. When I first tried it I thought that I had to specify the spell (which you can't do with custom spells), but maybe I don't have to.... |
| 12-31-2005, 10:38 PM | #4 |
ok I'm sorry how exactly do I loop him. I am in my trigger menu looks like this: [RAINOFFIRE] |-[]RAINOFFIRE |[-]--EVENTS --|----Unit - A Unit Begins Casting An Ability |[-]--Conditions --|----(Ability being cast) Equal to RAIN OF FIRE then I get lost looking for any action which is responsible for looping :s |
| 12-31-2005, 10:40 PM | #5 |
i cant rem exactly but sumin like 'From to integer A' go in all should be nearish the top |
| 12-31-2005, 10:51 PM | #6 |
nah integer A is a for loop, you need a while loop (kinda) the thing to loop till Stops casting an ability is great and it is the best solution unless you want multiinstancibility and you are a GUI guy, so I will use the current order of unit condition this time. Note: the order string a derived ability uses is the same as its base ability , unless it is spellbook / channel and you changed the Base Order Id field. Trigger Called Loop:
Events:
Conditions:
Current Order of (triggering unit) equal to (blizzard)
Actions:
Set mana of (triggering unit) to (mana of triggering unit) - 30
if (mana of (triggering unit) less than or equal to 0 )
Unit - Pause (triggering unit)
Unit - Order (triggering unit) to stop
-- probably the pause / unpause are not needed
Unit - Unpause (triggering unit)
wait 1 game-time second
Trigger - Run (this trigger) (checking conditions)
Trigger called Blizzard:
Events:
A unit starts the effect of an ability
Conditions:
Ability being cast equal to (blizzard (warcraft I))
Actions:
Wait 1 second
Trigger - Run (loop) checking conditions
|
| 01-01-2006, 03:23 AM | #7 |
Thank you!:D I will try this out right now. btw: do you know if there are any precreated spells which channel? Supposedly I am looking in this condition menu and it referrs to channeled spells. And also, this condition will be interrupted if I give the unit a new command in the middle of it casting, correct? ---- HI I wanted to say I figured out what you want me to do. However, I am unable to get it to refer to a different trigger-- don't know why but it does this Current Order of (triggering unit) equal to (Order(stop)) I do not think (Order(blizzard)) is the same thing? Instead I am going to try to use this other function: Current Order of (triggering unit) equal to (Issued Order) and combine both triggers into one, so issued order referrs to the event which triggers the trigger. ---- OH wait! I think, I got most of what u said to do to work. ---- Alright Now I am having an even more frustrating problem. The original triggers you sent me were too complex, and did not work, but I was able to get a variation of your triggers to work: LOOP Events Unit - A unit Begins casting an ability Conditions (Ability being cast) Equal to RAIN OF FIRE Actions Wait 1.00 seconds Unit - Set mana of (Casting unit) to ((Mana of (Triggering unit)) - 10.00) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Mana of (Triggering unit)) Less than or equal to 9.00 Then - Actions Unit - Order (Triggering unit) to Stop Else - Actions Trigger - Run (This trigger) (checking conditions) Ok, everything works "fine" except for 1 little problem. If I manually stop the unit from casting the spell, the unit's mana is still depleted by 10 every seconds. I need this loop to stop working if you issue a new order to the unit. I have tried adding variations of this loop to the conditional statement but it is not working!!!!! If - Conditions (Triggering unit) Equal to (Ordered unit) Then - Actions Unit - Set mana of (Triggering unit) to (Mana of (Triggering unit)) For Then - Actions I used variations of UNIT STOP, PURGE TRIGGER, etc..... I even tried making several variations a new trigger like this: ENDLOOP Events Unit - A unit Stops casting an ability Conditions (Ability being cast) Equal to RAIN OF FIRE Actions Trigger - Turn off LOOP <gen> Wait 2.00 seconds Trigger - Turn on LOOP <gen> but the damn thing keeps reducing my units mana to 0 even if he stopped casting the spell. |
| 01-01-2006, 01:28 PM | #8 |
Ok, I used pseudo code , I haven't used GUI in ages and I can't remember how each function actually looks like but the logic was right. Yep it was order comparission : (Current Order of (triggering unit)) equal to Order(blizzard) Since you seemed exceptical I tested the triggers I posted and they work. Use Starts the effect of an ability instead of Begins casting an ability, because the "Starts ..." is the one that triggers once the unit spends mana/cooldown , "Begins ..." is the one that happens just before and it actually servers the purpose to add conditions to the casting of spells. When maps use "Begins casting an ability" their custom spells can be abused (you get to cast them for free if you are just quick enough to press Stop after you started casting the spell) Also avoid to repeat posts, just use the edit button, you can also create the new post then delete the previous one (make sure to add the first post's text into the new one) And use [code] tags to preformated text, makes it easier to read |
| 01-01-2006, 03:42 PM | #9 |
I had problems with the current order command, I thought you wanted me to have the current order be equal to the name of the original loop trigger, I did not know you meant it to be the spell. :D ;D |
| 01-01-2006, 04:44 PM | #10 | |
Quote:
Vex, why pause the unit and unpause? Why is ordering to stop not good enough? |
| 01-01-2006, 04:49 PM | #11 |
It works without pause/unpause. He said himself up there somewhere that pause may not be needed. !:D Doesn't matter with Rain of Fire anyway because it has an effect delay of .2 seconds. !:D |
| 01-01-2006, 06:01 PM | #12 | |
Quote:
|
| 01-01-2006, 06:23 PM | #13 |
Pausing is needed when the spell doesn't target a unit/point, else it is not. |
| 01-01-2006, 06:24 PM | #14 |
I don't think that's true |
| 01-01-2006, 06:29 PM | #15 |
In my map, I have triggers to stop units when they try to cast spells in areas where it aren't allowed, I was having a lot of trouble with instant cast abilities (and only those), when I added the pause it stopped problems with instant cast. It should be right. |
