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

Chance to miss??

Status
Not open for further replies.
Level 4
Joined
Dec 8, 2005
Messages
58
Im trying to make a tower have a 35% chance of missing its attacks all the time. I tried to make a ability based off of Drunken Haze but can't seem to make my dummy unit cast it on my tower when its built here's my trigger...

Code:
Defence Turrent
    Events
        Unit - A unit Finishes construction
    Conditions
        (Unit-type of (Constructed structure)) Equal to 50. Cal Defence Turret
    Actions
        Unit - Create 1 Dummy Unit for (Triggering player) at (Position of (Constructed structure)) facing Default building facing (270.0) degrees
        Unit Group - Pick every unit in (Units of type Dummy Unit) and do (Actions)
            Loop - Actions
                Unit - Add Miss for Defence Turrent  to (Picked unit)
                Unit - Order (Picked unit) to Neutral Pandaren Brewmaster - Drunken Haze (Constructed structure)
                Unit - Remove Miss for Defence Turrent  from (Picked unit)
                Unit - Add a 2.00 second Generic expiration timer to (Picked unit)

It just don't work and I am not sure why. I should also add I'm very noob with Dummy Units :oops: . So yeah I just want the tower to miss 35% of time every time it attacks.
 
Level 6
Joined
Apr 4, 2005
Messages
299
1) Use Last Created Unit, not Pick Every Units
2) Try to use modified Curse spell
3) It is better to make dummy with negative regeneration or remove it after finishing of trigger than add expiration timer (timers are expensive)


There is another alternative to add this "automiss" ability to turret and order turet to cast on itself and then remove ability
 
Level 6
Joined
Feb 18, 2005
Messages
263
bash couses a unit to stop. even if the time is set to 0.01 (0.00 means for ever) it would be neccessary to reorder it to move...

therefore i would recommend you to use 'critical strike' instead. with a 35% chance to hit (set the damage to 0 on success)
 
Level 4
Joined
Dec 8, 2005
Messages
58
well I feel dumb. I fixed my promble and it was not he trigger that was working just fine, the real proble was that I forgot to make my spell cost 0 mana(it cost 75) my dummy unit didd'nt have any mana(Based off of Pesent) so yeah I'm dumb but my spell and trigger work now, heres finale triiger for those who would like to know...

Code:
Defence Turrent
    Events
        Unit - A unit Finishes construction
    Conditions
        (Unit-type of (Constructed structure)) Equal to 50. Cal Defence Turret
    Actions
        Unit - Create 1 Dummy Unit for (Triggering player) at (Position of (Constructed structure)) facing Default building facing (270.0) degrees
        Unit - Add Miss for Defence Turrent  to (Last created unit)
        Unit - Order (Last created unit) to drunkenhaze (Constructed structure)
        Unit - Remove Miss for Defence Turrent  from (Last created unit)

Thanks to those who tried to help. I did change the trigger a little from the origanal but they both worked. And I say it again... I'm dumb
 
Status
Not open for further replies.
Top