• 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.

[Solved] Metamorphosis/immolation crossover

Status
Not open for further replies.
Level 3
Joined
Feb 25, 2009
Messages
38
So ill jump right to it;
What i've been failing to do for the past few days is to make some sort of trigger that makes out an ability that is seemingly like Metamorphosis, but without an expiration timer. Instead i want the ability to drain mana while active. I then want it to automatically cancel the effect (being a boost to strength based on the hero's experience and intelligence) when i either run out of mana or cancel the effect manually. Perhaps even if the unit is, say, stunned?

Is such a thing possible?

For the record, i am not in any way experienced in advanced triggering, but i do have some years of experience with it.

I'll dump the two simple triggers i have made so far. They probably leak like hoola hoops, but i did my best. They are simply where i left off after i gave up the other day, after trying like 50 different triggers for the decast effect.

  • cast
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to 'the ability casted by the hero (based off immolation)'
      • (Unit-type of (Casting unit)) Equal to 'the hero'
    • Actions
      • Set StrIncrease = ((Intelligence of (Casting unit) (Include bonuses)) x ((Hero experience of (Casting unit)) / 200))
      • Set Str = (Strength of (Casting unit) (Include bonuses))
      • Hero - Modify Strength of (Casting unit): Add StrIncrease
  • decast
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(unimmolate))
      • (Ordered unit) Equal to (Triggering unit)
    • Actions
      • Hero - Modify Strength of (Triggering unit): Set to Str
      • Hero - Enable experience gain for (Triggering unit)

The casting works, it adds strength to the hero, but i can't figure out how to cancel the effect and reset it to the original strength.
 
im not sure about the metamorphosis part but u can trigger everything else. i would make abilities tht add a percent or whatever u want to add to the unit then when its mana = 0 remove the abilities from tht unit. as for the str agi or int stats just make an array and assign the heros str to those in each array. example player 1s hero agi[1] = hero agi points, str[1] = hero str points, int[1] = hero int points. make sure to save those values b4 the modifications are added. then just set them back when the ability ends.

event
periodic 1.00 seconds
conditions
actions
set units mana = units mana - 1
if units mana = 0
then
remove ability
else
 
Last edited:
Level 3
Joined
Feb 25, 2009
Messages
38
@death
Yes, i understand how to do it, i just don't know how to get it into a trigger, and making it work properly (assuming i understood what you said correctly).
The main problem i have, is that im struggling to find out what i should use as an event for the effect to cancel..

@daffa
Yeah, i'll do that.

EDIT:
so i fiddled some more, and got it working - kind of. Debugged, and the issue i have now, is that both the casting trigger AND the canceling trigger starts when i cast the ability, so they null eachother out.. Or something.
I wanted a short-lasting ability... But not THAT short ._.

I uploaded the map, if anyone wants to have a look at it.. I'm out of ideas :goblin_boom:
 

Attachments

  • (2)BanditRidge.w3x
    167.8 KB · Views: 111
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,243
  • cast
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(immolation))
        • Then - Actions
          • Set dreadlord = (Triggering unit)
          • Set Str = (Strength of dreadlord (Include bonuses))
          • Set StrIncrease = ((Intelligence of dreadlord (Include bonuses)) x ((Hero experience of dreadlord) / 200))
          • Hero - Modify Strength of dreadlord: Add StrIncrease
          • Game - Display to (All players) the text: debug cast
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Issued order) Equal to (Order(unimmolation))
            • Then - Actions
              • Set dreadlord = (Triggering unit)
              • Hero - Modify Strength of dreadlord: Subtract StrIncrease
              • Game - Display to (All players) the text: debug decast
            • Else - Actions
 
Level 3
Joined
Feb 25, 2009
Messages
38
thanks a bunch!
had to fix it, since the trigger ran on the Demon Hunter's Immolation aswell, but other than that, it works like a charm!

+rep to everyone that helped :)

EDIT: it doesn't remove the stats if you let the ability drain all of your mana..
 
Level 37
Joined
Mar 6, 2006
Messages
9,243

  • Untitled Trigger 099
    • Events
      • Unit - Demon Hunter 0054 <gen>'s mana becomes Less than 1.00
    • Conditions
      • ((Triggering unit) has buff Immolation) Equal to True
    • Actions
      • Game - Display to Player Group - Player 1 (Red) for 3.00 seconds the text: Remove Bonus

If the unit is not preplaced, you can add the event with Trigger - Add new event
 
Level 3
Joined
Feb 25, 2009
Messages
38
i don't understand..

EDIT: okay, so i think i got it now, with this one

  • cast
    • Events
      • Unit - Dreadlord 0056 <gen>'s mana becomes Less than or equal to 1.00
    • Conditions
      • ((Triggering unit) has buff Immolation) Equal to True
    • Actions
      • Unit - Order dreadlord to Night Elf Demon Hunter - Deactivate Immolation
but as you said, the unit isn't supposed to be pre-placed. i still don't understand that part.. this is hurting my brain more than it should.
 
Last edited:
Level 3
Joined
Feb 25, 2009
Messages
38
ooohhh!!!

i literally didn't know that section even existed :O
does it activate on its own, or does it need to be triggered?
 
Level 3
Joined
Feb 25, 2009
Messages
38
  • cast
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Dreadlord
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(immolation))
        • Then - Actions
          • Set dreadlord = (Triggering unit)
          • Set Str = (Strength of dreadlord (Include bonuses))
          • Set StrIncrease = ((Intelligence of dreadlord (Include bonuses)) x ((Hero experience of (Triggering unit)) / 400))
          • Hero - Modify Strength of dreadlord: Add StrIncrease
          • Hero - Disable experience gain for (Triggering unit)
          • Trigger - Add to deactivate <gen> the event (Unit - (Triggering unit)'s mana becomes Less than or equal to 1.00)
          • Game - Display to (All players) the text: debug cast
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Issued order) Equal to (Order(unimmolation))
            • Then - Actions
              • Set dreadlord = (Triggering unit)
              • Hero - Modify Strength of dreadlord: Subtract StrIncrease
              • Hero - Enable experience gain for (Triggering unit)
              • Game - Display to (All players) the text: debug cast p2
            • Else - Actions
  • deactivate
    • Events
    • Conditions
      • ((Triggering unit) has buff Immolation) Equal to True
    • Actions
      • Unit - Order dreadlord to Night Elf Demon Hunter - Deactivate Immolation

this seems to work :)
thanks for all the help!
 
Status
Not open for further replies.
Top