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

[Trigger] Dragon morphing with a potion

Status
Not open for further replies.
Hi forum I try to make a potion, when drinked to morph you to a dragon for 15 seconds. Can you check this and tell me what I can change in it so it work for morphing back? :grin:
  • PotionSkies
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Potion of the Skies
    • Actions
      • Unit - Replace (Triggering unit) with a Red Dragon using The new unit's max life and mana
      • Wait 30.00 seconds
      • Unit - Replace (Triggering unit) with a dragonunittypes[(Player number of (Owner of (Triggering unit)))] using The new unit's max life and mana
  • dragon types
    • Events
      • Time - Elapsed game time is 60.00 seconds
    • Conditions
    • Actions
      • Set dragonunittypes[(Player number of (Owner of Paladin))] = Paladin
      • Set dragonunittypes[(Player number of (Owner of Archmage))] = Archmage
      • Set dragonunittypes[(Player number of (Owner of Mountain_King))] = Mountain King
      • Set dragonunittypes[(Player number of (Owner of Blood_Mage))] = Blood Mage
      • Set dragonunittypes[(Player number of (Owner of Wizard))] = Wizard
      • Set dragonunittypes[(Player number of (Owner of Ranger))] = Ranger
      • Set dragonunittypes[(Player number of (Owner of Blademaster))] = Blademaster
      • Set dragonunittypes[(Player number of (Owner of Tauren_Chieftain))] = Tauren Chieftain
      • Set dragonunittypes[(Player number of (Owner of Shadow_Hunter))] = Shadow Hunter
      • Set dragonunittypes[(Player number of (Owner of Brewmaster))] = Brewmaster
      • Set dragonunittypes[(Player number of (Owner of Far_Seer))] = Far Seer
      • Set dragonunittypes[(Player number of (Owner of Beastmaster))] = Beastmaster
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
If this was for normal units, it would be fine, however for heroes this brings a lot of problems - hero loses all items, experience, etc.

I would do it simply - when unit drinks potion, change it to neutral passive and hide it via "Unit - Hide unit".
When dragon dies/disappears, unhide hidden hero and change it back to its original owner.
 
You mean this?

  • PotionSkies
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Potion of the Skies
    • Actions
      • Unit - Create 1 Red Dragon for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Facing of (Triggering unit)) degrees
      • Selection - Select (Last created unit) for (Owner of (Triggering unit))
      • Set Dragon[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
      • Unit - Change ownership of (Triggering unit) to Neutral Passive and Change color
      • Unit - Hide (Triggering unit)
      • Unit - Order (Triggering unit) to Follow (Last created unit)
      • Wait 30.00 seconds
      • Unit - Change ownership of (Triggering unit) to (Owner of Dragon[(Player number of (Owner of (Triggering unit)))]) and Change color
      • Unit - Unhide (Triggering unit)
      • Unit - Remove Dragon[(Player number of (Owner of (Triggering unit)))] from the game
      • Unit - Set life of (Triggering unit) to (Percentage life of Dragon[(Player number of (Owner of (Triggering unit)))])%
      • Set Dragon[(Player number of (Owner of (Triggering unit)))] = No unit
      • Selection - Clear selection for (Owner of (Triggering unit))
      • Selection - Select (Triggering unit) for (Owner of (Triggering unit))
yeah, very simple...
 
Last edited:
Try using one of the morph abilities such as demon form, avatar or and those crow / bear form ones. These change unit type while retaining most of the heroes properties.

You forget that they require specific unit to morph back...

I liked Nichulus's idea and the final trigger is this:
  • PotionSkies
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Potion of the Skies
    • Actions
      • Unit - Create 1 Red Dragon for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Facing of (Triggering unit)) degrees
      • Selection - Select (Last created unit) for (Owner of (Triggering unit))
      • Set Dragon[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
      • Unit - Hide (Triggering unit)
      • Unit - Order (Triggering unit) to Follow (Last created unit)
      • Unit - Set (Triggering unit) acquisition range to 0.00
      • Custom script: call UnitAddAbility(GetTriggerUnit(), 'Aloc')
      • Unit - Order Dummy Rooter 0044 <gen> to Neutral Dark Ranger - Silence (Position of (Triggering unit))
      • Wait 30.00 seconds
      • Custom script: call UnitRemoveAbility(GetTriggerUnit(), 'Aloc')
      • Unit - Set (Triggering unit) acquisition range to (Default acquisition range of (Triggering unit))
      • Unit - Unhide (Triggering unit)
      • Unit - Set life of (Triggering unit) to (Percentage life of Dragon[(Player number of (Owner of (Triggering unit)))])%
      • Unit - Remove Dragon[(Player number of (Owner of (Triggering unit)))] from the game
      • Set Dragon[(Player number of (Owner of (Triggering unit)))] = No unit
      • Selection - Clear selection for (Owner of (Triggering unit))
      • Selection - Select (Triggering unit) for (Owner of (Triggering unit))
 
Status
Not open for further replies.
Top