Abilities with Chance to work

Vunjo

New Member
Reaction score
1
How to make abilities that have a chance to block damage, get gold, heal yourself??
 

hopy

Active Member
Reaction score
64
Depends, for x chance to block damage use a Mountain Gaints (Night elf unit) Hardened Skin ability.

For a x chance to give gold on attack or anything you could use something like:

Trigger:
  • Greedisgood
    • Events
      • Unit - A unit is Attacked
    • Conditions
      • ((Attacked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
      • (Random integer number between 1 and 2) Equal to 1
    • Actions
      • Player - Set (Owner of (Attacking unit)) Current gold to (((Owner of (Attacking unit)) Current gold) + (Random integer number between 1 and 2))


This for example has a 50% chance (Random number between 1 and 2 = 1) to give 1-2 gold on each attack.
 

educator

New Member
Reaction score
9
well for chance to block damage you can use the standard defend or evasion abilities for chance to heal use
events
a unit casts an ability
conditions
(ability being cast) equal to (ur ability)
actions
set interger_variable = random number between 1 - 100
if:then:else multiple actions
if: interger_variable less than or equal to 50
then: (set life of(casting unit) to (life of (casting unit) + (ur heal amount)
else: do nothing
this trigger will have a 50% cance to heal the caster
NOTE-some things might have the wrong name

and for gold
events
a unit casts an ability
conditions
(ability being cast) equal to (ur ability)
actions
set interger_variable = random number between 1 - 100
if:then:else multiple actions
if: interger_variable less than or equal to 25
then: add (ur amount) to (owner of(casting unit) current gold
else: do nothing
this one will have 25% chance to add 'ur amount' to the owner of the casing unit current gold
EDIT- ha ha 3 people replied at once (sort of)
 

BAkil

New Member
Reaction score
9
Trigger:
  • Random01
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Set INTEGER = (Random integer number between 1 and 3)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • INTEGER Equal to 1
        • Then - Actions
          • -------- Do Random 1 Here --------
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • INTEGER Equal to 2
            • Then - Actions
              • -------- Do Random 2 Here --------
            • Else - Actions
              • -------- Do Random 3 Here --------


This triggers whenever a unit casts the Animate Dead ability. You have to replace the Animate Dead ability with the one you want to use for your trigger. If you want it to occur on different occasions, such as when a unit is attacked or every so many seconds, just let me know and I'll try to help you out.

Basically you need to set an INTEGER variable (you can call it whatever you like, so long as it's variable type is integer) to a random number. Then you just have to check whatever number it is, and put whatever you want to happen in there.

For instance in the Do Random 1 Here part you can put the damage reduction thingy (which I don't know how to work )= ), in the Do Random 2 Here part you can add gold, and in the Do Random 3 Here you can heal something.

But you must replace the Animate Dead condition with the one that you want to use for your ability.

If there are any problems, anything that needs clarification or if you want me to be more specific, just let me know and I'll do my best to help ya!
 

Vunjo

New Member
Reaction score
1
Game Images

How should i change ''game images''. I mean in WE: Advanced-Game Interface and then Image.
I allready made a blue color, used wc3 image extractor with succes, imported. Now it is all black.
Should i change custom path?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top