• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Help with replacing a potion's effect

Status
Not open for further replies.
Level 10
Joined
Aug 19, 2008
Messages
491
Hey dudes! :grin:
I'm making this passive skill. See, I want that the caster to have a 15% chance that a consumed potion will grant a better effect.
However, I don't know how to do this :bored: I tried
Make a new potion -> Drop normal potion -> Remove normal buff -> Add new potion -> Use new potion -> Drop new potion -> Add normal potion.
Well, the Drop normal potion, Remove normal buff and Add normal potion worked well, but not the rest.

Help meeeee!
Cookie to first dude with proper solution :thumbs_up:
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
I created a solution.

1. Create custom ability with specific buff
2. Create dummy unit
3. Create custom ability (Dummy Bonus Ability (Example: Inner Fire, Rejuvenation, Heal, Bloodlust...) )
4. Implement this trigger.

  • Potions
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • ((Hero manipulating item) has buff <YourBuff>) Equal to True
      • (Item-type of (Item being manipulated)) Equal to <Potion>
    • Actions
      • Set RandomInteger = (Random integer number between 1 and 2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RandomInteger Equal to 1
        • Then - Actions
          • Set TempPoint = (Position of (Hero manipulating item))
          • Unit - Create 1 Footman for (Owner of (Hero manipulating item)) at TempPoint facing Default building facing degrees
          • Set Dummy = (Last created unit)
          • Unit - Order Dummy to <AbilityOrderID> (Hero manipulating item)
          • Unit - Add a 1.00 second Generic expiration timer to Dummy
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: set udg_Dummy = null
        • Else - Actions
NOTE: Hero manipulating item works for non hero units.
 
Level 10
Joined
Aug 19, 2008
Messages
491
I created a solution.

1. Create custom ability with specific buff
2. Create dummy unit
3. Create custom ability (Dummy Bonus Ability (Example: Inner Fire, Rejuvenation, Heal, Bloodlust...) )
4. Implement this trigger.

  • Potions
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • ((Hero manipulating item) has buff <YourBuff>) Equal to True
      • (Item-type of (Item being manipulated)) Equal to <Potion>
    • Actions
      • Set RandomInteger = (Random integer number between 1 and 2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RandomInteger Equal to 1
        • Then - Actions
          • Set TempPoint = (Position of (Hero manipulating item))
          • Unit - Create 1 Footman for (Owner of (Hero manipulating item)) at TempPoint facing Default building facing degrees
          • Set Dummy = (Last created unit)
          • Unit - Order Dummy to <AbilityOrderID> (Hero manipulating item)
          • Unit - Add a 1.00 second Generic expiration timer to Dummy
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: set udg_Dummy = null
        • Else - Actions
NOTE: Hero manipulating item works for non hero units.
Well, that would work for a very specific amount of potions.
Healing, per example, works fine, and so does this.
But what about Vampiric Potion? Or Anti-magic Potion? Or Healing Salves?
These are not solvable with a dummy using an aura due to the initial architecture of the map either :bored:
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Well, that would work for a very specific amount of potions.
Healing, per example, works fine, and so does this.
But what about Vampiric Potion? Or Anti-magic Potion? Or Healing Salves?
These are not solvable with a dummy using an aura due to the initial architecture of the map either :bored:

You can use ANY bonus effects. For example:
  • Unit - Set mana of unit (To Value)
  • Unit - Make unit Invulnerable / Vulnerable
  • Unit - Set life of unit (To Value)
  • Unit - Add Ability to unit
 
Level 10
Joined
Aug 19, 2008
Messages
491
You can use ANY bonus effects. For example:
  • Unit - Set mana of unit (To Value)
  • Unit - Make unit Invulnerable / Vulnerable
  • Unit - Set life of unit (To Value)
  • Unit - Add Ability to unit

Please explain that a little deeper, because I don't know what you mean here?
Eg: "Set mana of unit". What? I told you that was trigger-possible, what do you mean?
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Please explain that a little deeper, because I don't know what you mean here?
Eg: "Set mana of unit". What? I told you that was trigger-possible, what do you mean?

You don't have to create dummy unit that casts some ability on unit.
You can add some ability (Example: Damage Bonus, Stat Bonus, Armor Bonus, Vampiric Aura (You can hide icon of any passive ability. See this tutorial) )
You can increase their life/mana or turn invulnerable.
 
Level 10
Joined
Aug 19, 2008
Messages
491
You don't have to create dummy unit that casts some ability on unit.
You can add some ability (Example: Damage Bonus, Stat Bonus, Armor Bonus, Vampiric Aura (You can hide icon of any passive ability. See this tutorial) )
You can increase their life/mana or turn invulnerable.
I know, but I told you that much of that doesn't work. I need it fully MUI, and much of that you tell me about doesn't stack.
I'm not a newbie user anymore, I can handle that kind of stuff myself (with dummies and such), and for this case it just doesn't work.
 
Status
Not open for further replies.
Top