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

Random buff?

Status
Not open for further replies.
Level 5
Joined
Dec 1, 2007
Messages
121
How can I make a ability with two effects have a bigger chance to add effect 1 on a unit and a smaller chance to add effect 2? For example a healing a 60% chance to heal a unit partially and a 40% chance to heal a unit completely
 
Level 18
Joined
Mar 7, 2005
Messages
824
Got something in my mind as i read your Question..
How about making a spellbook, and adding two abilities..
the one with 60% to cast Heal and the other with 40% chance to cast complete Heal
now add those two abilities to the spellbook and give this spellbook to your Hero/Unit that shall get that spell.. now disable this spellbook via triggers.. The effect is, that the spells will still work, but you don't see the spellbook..

Finally add some ability, that doesn't do anything, just to show the player the ability and what it does.. should work =)
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

  • Ability
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to <Your ability>
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Greater than or equal to 40
        • Then - Actions
          • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + xx )
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than 40
            • Then - Actions
              • Unit - Set life of (Target unit of ability being cast) to 100.00%
            • Else - Actions
              • Do nothing
MfG
Dr. Boom (and no it doesn't leak =P )
 
Level 5
Joined
Dec 1, 2007
Messages
121
Got something in my mind as i read your Question..
How about making a spellbook, and adding two abilities..
the one with 60% to cast Heal and the other with 40% chance to cast complete Heal
now add those two abilities to the spellbook and give this spellbook to your Hero/Unit that shall get that spell.. now disable this spellbook via triggers.. The effect is, that the spells will still work, but you don't see the spellbook..

Finally add some ability, that doesn't do anything, just to show the player the ability and what it does.. should work =)

But how can I make him cast them???
 
Status
Not open for further replies.
Top