• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

chance for a unit to miss or to strike an attack?

Status
Not open for further replies.
Level 4
Joined
Apr 9, 2008
Messages
73
with witch aspect of the objekt editor can i change the chance for a unit to miss or to strike an attack?

Mfg, MeEsA
 
Last edited by a moderator:
Level 18
Joined
Aug 23, 2008
Messages
2,319
If you want to change chances for individual units or unit types, you should make a chance trigger. This means a trigger with a integer variable RANDOM, which is a random number between 1 and 100.

Like this:
  • Chance
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Set RANDOM = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RANDOM Less than or equal to 25
        • Then - Actions
          • Unit - Cause (Triggering unit) to damage (Target unit of issued order), dealing 0.00 damage of attack type Normal and damage type Normal
        • Else - Actions
 
Level 9
Joined
Oct 7, 2007
Messages
599
Avator starts out with a good point, but I do not agree that the way to make the unit "miss" is by making it deal one damage to its original target. Instead, it is better to make it detect "whenever a unit is attacked" and make it create a dummy unit which casts a modified curse with 100% miss chance that casts it on the attacker. Since "Whenever a unit is attacked" event runs before damage is dealt, the unit will miss when it attacks.
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
advance option > game constant
There is a constant "Combat - chance to miss(blahblah)", (0.25 default), which gives the chance to miss when the attacked unit stands on higher ground, but it's the same for each unit.

You could use Drunken Brawler (or critical strike, bash and so on) ability, it also includes a chance to miss.
 
Level 4
Joined
Apr 9, 2008
Messages
73
hmm i tryed to base on critical strike there i cant find a chance for miss, only a chance to have a critical strike and a chance to avoid an attack
 
Level 12
Joined
Apr 16, 2007
Messages
262
I have only one other suggestion for you...

In the game there are two abilities that you utilise, one of course being
* Critical Strike
and the other being
* Evasion

Now, both of these two abilities can be edited, so if you were to change the
Critical Strike percentage, it would influence how likely the attacking unit would deal extra damage.

If you changed the Evasion Percentage, you would be influencing how likely it would be for the unit being attack to dodge the attack, for example if you changed this to 50%, the unit would dodge 50% of the attacks made on it.

Hope this helps :D
 
Level 4
Joined
Apr 9, 2008
Messages
73
ah i think i understand the prcentage for critcal strike is miss chance and the multiplicator for the crit have to be 0 right?

EDIT:
hm dont work :(
i want a spezific miss chance for one unit not a percentage chance for a unit to avoid a hit and let the enemy miss like evasion do
 
Last edited by a moderator:
Level 4
Joined
Apr 9, 2008
Messages
73
ok i found a solution:

-base on critical strike
-the percentage to get a critical strike is set to the percentage for miss you what to give to your unit
-put damage multiplicator to 0.01, that will still damage but so less that nearly every unit will regenerate taken damage in seconds;)
 
Status
Not open for further replies.
Top