• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Magical Armor Reduction

Status
Not open for further replies.
Level 7
Joined
Dec 14, 2012
Messages
192
Hello there~

The problems are solved. If you want an ability like that for yourself, you can use my trigger~ Just to add: The ability makes the target of it take extra magic damage for the next 10 seconds.

I thought to myself: If i try to make it without a variables and/or waits, it may work out. And so I created this, it works rather nice - the only problem is, that the ability does not give a buff(The Frost Nova Buff would slow the enemy automatically)
I also used another trick: The ability to remove the effect has a casting time of 10 seconds - this replaces the wait.
Also, to remove the ability-button, I just used the item ability for Magical Bracers and set negative values to it - the item ability is invisible by default, after all.
  • NB_Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Negative Blast (Revenant)
    • Actions
      • Unit - Add Magical Armor Reduction to (Target unit of ability being cast)
      • Unit - Set Level of Magical Armor Reduction for (Target unit of ability being cast) to (Level of Negative Blast (Revenant) for (Triggering unit))
      • Unit - Create 1 Negative Blast Dummy for (Owner of (Triggering unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
      • Unit - Add a 12.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
  • NB Remove
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Remove Magical Armor Reduction
    • Actions
      • Unit - Remove Magical Armor Reduction from (Target unit of ability being cast)
 
Last edited:
Level 14
Joined
Apr 20, 2009
Messages
1,543
What if his map is singleplayer? :p

multi unit instanceable (each unit can cast the ability without other units conflicting regardless of which player it's controlled by)
multi player instanceable (each player can cast the ability but not with several units. So in other words each player can cast the ability with only 1 unit at a time else conflicts will arise)

Do you see why MUI has got nothing to do with the game being multiplayer or not?
Unless it's MPI ofcourse in which case each player can cast an ability with 1 unit controlled by that player at a time.
In this case it's useless for Single player but could be useful for Multiplayer.
 
Level 7
Joined
Dec 14, 2012
Messages
192
Mh, I changed that part~ Wonder how that happened o_O

Though, now I am faced with the problem that the trigger seems to only activate once per game. Just tested it out~ Any way to solve that problem?

And what exactly does MUI mean? Not in terms of meaning of the word but rather~ What does "the trigger is not in MUI" mean? I hope you understand what I ask, this question is kinda... tricky to formulate xD

For the Spellbook idea: How exactly would I have to trigger it to work out? If you could show me an example, I would be grateful.
 
Level 7
Joined
Dec 14, 2012
Messages
192
There are many tutorials and resources here in Hive.
The easiest is Dynamic Indexing.
The hardest is hashtable.
Okay, I see~ Well, now I'd simply wish to know, what would I need to do with this trigger, to make it work properly? If you could briefly explain/show it to me, I would be grateful.
 

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,267
Reducing the enemy magic resistance isn't easy to do for someone fresh in the editor. I'm not at my comp so I cannot show you an example.

This isn't multi unit instance friendly because if someone would cast this spell again before the wait timer expires a new variable would be set on a second unit and that debuff wouldn't be removed on the first unit.

And the reason it only works once is because you put a wait inside a loop which fires 10 times before the values set would take affect once, but even if you turn of the trigger the rest would trigger 9 more times ans thus ending up with -10 currentindex and -9 maxindex. That's why this only works once.
 
Level 7
Joined
Dec 14, 2012
Messages
192
Reducing the enemy magic resistance isn't easy to do for someone fresh in the editor. I'm not at my comp so I cannot show you an example.

This isn't multi unit instance friendly because if someone would cast this spell again before the wait timer expires a new variable would be set on a second unit and that debuff wouldn't be removed on the first unit.

And the reason it only works once is because you put a wait inside a loop which fires 10 times before the values set would take affect once, but even if you turn of the trigger the rest would trigger 9 more times ans thus ending up with -10 currentindex and -9 maxindex. That's why this only works once.
I see~ I suspected the wait to be a problem.
hOwever, how exactly can I solve this? The wait is practically the duration of the debuff~

In any case, the problem is the "wait". What else is possible to set the de-buff duration then?
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
There are many tutorials and resources here in Hive.
The easiest is Dynamic Indexing.
The hardest is hashtable.

More like vice versa. Hashtables are simple 2D arrays and you can use them knowing only this. Their main advantage is the range of indices which exceeds the single dimensional ones (2^32 compared to 2^13) and allows you to store handle IDs to attach data to them.
Indexing requires multiple variables, managing and recycling instances.
 
Level 7
Joined
Dec 14, 2012
Messages
192
Ah, so that is a rawcode xD
Anyway, I'll post the rawcode later then(Right now, I am busy being tired ^..^)~ The base ability I used however is Frost Nova~ The dummy ability is based on Channel, the buff ability(that reduces magical resistance) is the item ability for runed bracers - just with negative values.
I used Frostnova, because I wanted an AoE ability, but debuff just one target(For Balance Reasons).
 
Status
Not open for further replies.
Top