| 05-06-2004, 11:40 AM | #1 |
Here is the deal. I want to make an item that, once in heroes' inventory, reduces the stun duration of ALL stun spells cast on him by 2 seconds. From what i understand - its undoable without triggers. Is it possible and if it is - how do i do that? |
| 05-06-2004, 12:25 PM | #2 |
Run a trigger that detects when a unit is attacked and is under the effect of the ability then do something like Wait - 2.00 seconds Unit - remove buff from unit ^_^ |
| 05-06-2004, 12:41 PM | #3 |
Well i don't want to limit stun to 2 seconds. I want to cut it by 2 seconds. So a, say, 3.5 sec stun will become a 1.5 sec stun. I understand there is a way to do it by using the proposed trigger and calculating wait time for every single stunning ability in the game. But isn't there a more universal way, which does not involve creating a ton of extra arrays? Maybe its possible to somehow get the casted ability's duration? |
| 05-07-2004, 03:59 PM | #4 |
I am serius when saying that this kind of spell is impossible, unless you make every hero a unit, and use resistant skill as the item's ability, and make every stun skill last 2 less seconds for heroes |
| 05-07-2004, 04:44 PM | #5 |
try "firmskin"(dont know english name >.<) the mountain giant has this ability, may that works? |
| 05-07-2004, 09:39 PM | #6 | |
Quote:
That should work. |
| 05-07-2004, 10:31 PM | #7 |
1.) That would remove it from some units prematurely 2.) That sets it to 2 seconds, not lowers it by 2 seconds. |
| 05-08-2004, 01:48 AM | #8 | |
Quote:
Um maybe something like this will work: For every Stunnig Spell you have, create another one that last two second less, then when your hero have the buff spell, remove it and make a fake Dummy unit with the spell with short duration and cast it on your hero hope it would work :D |
| 05-08-2004, 02:24 AM | #9 |
This spell isn't impossible. There is always a work around somewhere. ^_^ OK, you need to do the following. -Totally trigger the STUN Spell, and the Item Resist -You need to make it so that the duritation of the stun is say... 5-(Level of Anti-Stun Item), or something like that. In your case, 2. -Once you have that down, make the duritation of the STUN in the object editor = 0. Then, when STUN is cast, make it so that you PAUSE the unit for the set amount of time. The 5-2 = 3. I'll whip you up a Test Map, just to see if this will work. Let it be known, I have never worked with ITEMS before, so... bear with me. |
| 05-08-2004, 02:46 AM | #10 |
Well, here's the map and the code. Code:
Storm Bolt
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Storm Bolta
Actions
Set Target = (Target unit of ability being cast)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Target has an item of type Anti-Stun) Equal to True
Then - Actions
Unit - Pause Target
Game - Display to (All players) the text: Paused 3 seconds.
Wait 3.00 seconds
Else - Actions
Unit - Pause Target
Game - Display to (All players) the text: Paused 5 seconds.
Wait 5.00 seconds
Unit - Unpause TargetAnd the map... |
| 05-08-2004, 01:15 PM | #11 |
That is a very crude trigger, and we all know how it would fail if two Storm bolts (or any other stun spells) were cast simultaneously. To make it foolproof, you would have to make an unit variable array of "targets", so that any unit that can stun another unit has it's own target. You would then also need another unit variable array to match the targets with stun-spell casters. Also, for this to be failsafe, no stun spell may have it's stun duration longer than it's cooldown. |
| 05-08-2004, 01:23 PM | #12 |
SIGH* The cooldown was for TESTING. Also, I don't care if it would take 5 storm bolts being cast at once to ruin it. It's the example, anyways, do it yourself if you knowhow so well. ^_^ |
| 05-08-2004, 06:08 PM | #13 |
So overall, the only way to implement such an item would be to trigger all the stun spells on map... KK i c :( |
| 05-08-2004, 06:19 PM | #14 |
No, I can make a <BETTER> version if you wanted. Just let me finish my spell I've been working on. :EDIT: Nevermind, I lied. :P |
| 05-08-2004, 09:13 PM | #15 | |
Quote:
How rude :> |
