Anyway to turn off mana shield as an item via trigger?

canons200

New Member
Reaction score
50
Do anyone has any experience to turn off mana shield as an item via trigger while mana shield is activated?

i make the trigger below, it works when the unit intends to activate mana shield, but it fails when the unit wants to deactivate mana shield.
Trigger:
  • Turn On Mana Shield
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Mana Guard Fake
    • Actions
      • Item - Remove (Item being manipulated)
      • Trigger - Turn off Turn Off Mana Shield <gen>
      • Hero - Create Mana Guard Real and give it to (Triggering unit)
      • Hero - Order (Triggering unit) to use (Last created item)
      • Game - Display to (All players) the text: Mana shield is on.
      • Trigger - Turn on Turn Off Mana Shield <gen>

The above trigger is working as the test is shown. However the below text didn't show when i pressed the item after the mana shield is activated.
Trigger:
  • Turn Off Mana Shield
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Mana Guard Real
    • Actions
      • Unit - Order (Triggering unit) to Neutral Naga Sea Witch - Deactivate Mana Shield
      • Item - Remove (Item being manipulated)
      • Hero - Create Mana Guard Fake and give it to (Triggering unit)
      • Game - Display to (All players) the text: Mana shield is off.

i try both way to turn off the mana shield, remove the item and deactivate mana shield, but it looks like the trigger can't detect the event "A unit Uses an item" while mana shield is activated.

I, of course, do manually drop put the item from the unit, it is obviously turning off the mana shield as the item is detached from unit.

So now, as i stated above, how to turn off mana shield via trigger rather than manually put down the item?
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
You could try ordering the unit to use the item instead of ordering it to deactivate mana shield; I don't think that works on items.
 

canons200

New Member
Reaction score
50
To KaefNomekop
Won't work, i try manually activate the mana shield while mana shield is running, it since like the mana shield is already activated at such can't perform activate to deactivate the mana shield.

Example>>> i left click item (activate it), mana shield is on. Here i manually left click again (to activate the deactivation of mana shield), it can't close the mana shield as it is already activated. That why i choose to remove the item from hero as it is 100% remove the mana shield but the event not allows me to fire this action.

if you still can't get what i mean, it is better to try a example by yourself and you will see the truth.
 

HydraRancher

Truth begins in lies
Reaction score
197
Mana shield as an item probably would cause errors. Could you not add it to the hero if the item is equipped?
 

canons200

New Member
Reaction score
50
To HydraRancher
Can't, due to my map setting, i have to allow activation and deactivation of mana shield (item),

nevermind, i will put a note in the item that if want to turn off mana shield, simple drop the item on the ground. Guess there is no other solution.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
You could make it a spell book with Mana Shield in it.
 

Happy

Well-Known Member
Reaction score
71
to deactivate i have 2 ideas to do it....dont know whether they work but i think so....but never tested...

1. order the hero to drop the item and pick it up again.
2. set the mana to 0 and then to the amount the hero has again.

maybe 1 of them work...
 

canons200

New Member
Reaction score
50
to Happy

1) i already did it, but the problem is the trigger event doesn't work. or put in the another way, the event can't be detected. Scroll up to read again if you still can't understand.

2) same problem, the event can't be detected.

What i need now is a event can be detected. then i can do the rest of the trigger.

To Weep

Thank for your help but i don't think you solution is possible for my map due to that is an item ability and need to be mui, moreover must able to turn on and turn off anytime during the game.
 

FannyShaver

Well-Known Member
Reaction score
31
Try to trigger dummy attack with damage equal to mana amount, then add mana back again. I just did the same thing with my Mana shield ability. Works fine.
 

canons200

New Member
Reaction score
50
To FannyShaver
No, what i need now is a trigger that allow me to turn off the mana shield (it is an item)
It such, for the trigger, it require event to run then only check condition and then action.

The problem is, the event can't be detected, or the event can't be used. So i need to search for another event for the trigger.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Maybe you could use two dummy items - one Mana Shield On and one Mana Shield Off. A unit with Mana Shield On will have a displayed buff, and using either item will replace it with the other. Then use triggers to detect if the unit taking damage has the buff, and if so restore that amount of life and remove that amount of mana, and also replace Mana Shield On with Mana Shield Off.
 

canons200

New Member
Reaction score
50
To kaerNomekop
i get your idea, but this is a lot of hardcore, due to the fact the mana shield can be upgraded. Thus each level of mana shield will absorb different amount of mana, not to mention the damage break through mana shield (100 damage but 1 mana left) and unstackable.

any other method that can use mana shield as base ability?
 

FannyShaver

Well-Known Member
Reaction score
31
So, if you want to turn it off use simple maths. If your mana shield absorbs 2 damage into mana for 1 point of damage (example) deal this damage to such unit. I tested that, works fine.

I set mana amount to 500 with mana shield absorbing 5 damage into mana for each point of damage. I set variable equal to 2500 and dealt it to the unit and then divided variable by /5 again and added result to target unit mana amount. Works fine and no real change is noticeable.
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top