• 🏆 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!

[Trigger] Archer (Passive) Spell !!!

Status
Not open for further replies.
Level 30
Joined
Dec 6, 2007
Messages
2,228
Hello
Im making a passive ability for an archer. He has a chance that his arrows hit specific body parts for example the leg. Our example has the effect that the attacked unit moves slower for maybe 10 seconds.
That is no problem.
The problem is the event i use.
  • Spell
  • Events
    • Unit-A Unit Is Attacked
  • Conditions
    • Attacking unit is equal to Archer
  • Actions
    • Trigger
If i use "A unit is attacked" the trigger runs when the archer starts attacking the unit, even not when the arrow hits the target.
The trigger should run as soon as the arrow hits the target.
How can i handle that?
 
Level 25
Joined
Jun 5, 2008
Messages
2,572
I think this should work even better, base your spell on Orb of slow/lightning and make an custom spell - curse,cripple,any target based spell as long it ain't stun, add your icon to the spell and make mana cost and cooldown 0 then add it as the Data - Spell Effect(not sure if this is correct).
Then i think -
  • Event Unit starts the effect of an ability
should work.
Not sure though.
 
Level 6
Joined
Sep 5, 2007
Messages
264
Doing it that way SHOULD work...

But, it creates possible issues down the track. It's an orb-effect and therefore any other orb-effects won't stack.
IE: the hero that uses this wouldn't be able to use an "orb of fire" aswell, and get the splash damage that the orb provides.

It all depends on how you want to do it. If Paladon doesn't want to use any other orbs, then that'd be all good.

I've done some pretty cool things using damage-detection systems before.
EG: custom critical hits/misses based on level differences, trigger based buffs, etc.

There's alot you can do with a good damage detection system, you've just gotta work it right. If you don't, everytime a unit gets damaged, you'll lag, or worse possibly crash.
 
Level 6
Joined
Sep 5, 2007
Messages
264
Someone else has joined my plight... LOL :xxd:

I agree totally. A damage detection system is the only way to successfully do this kind of thing, accurately.

Orb-effects are sloppy in my opinion, they can't stack & they don't always activate.
Waits just seem like a little bit of a hack.
Using the "unit is attacked" just plain won't work anywhere near as well (unless coupled with a damage detection system).

If anyone else has a better solution, I'd REALLY like to hear it. Because I am yet to see one. :thumbs_up:

BTW redscores, you really need a red dragon as your avatar. It'd go SO much better with "The red death!". At the moment, it looks like "The blue death!"
 
Level 19
Joined
Oct 12, 2007
Messages
1,821
Think I solved it for you.

You need 2 triggers for it. I will add some explanation.

Trigger #1
  • Unit Detection
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to (==) Archer
    • Actions
      • Set AttackingUnit = (Attacking unit)
      • Trigger - Add to PassiveAbility Effect <gen> the event (Unit - (Triggering unit) Takes damage)
This trigger registers everyone that's attacked by your archer. When it registers a unit, it runs a new trigger to start the effect.
It uses 1 variable: AttackingUnit
This variable will save the target of your archer.

Trigger #2
  • PassiveAbility Effect
    • Events
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to (<=) 20
        • Then - Actions
          • Unit - Cause (AttackingUnit (Variable)) to damage (Triggering unit), dealing OWNAGE AMOUNT damage of attack type Pierce and damage type Normal
        • Else - Actions
This trigger starts the effect (I only added a damage effect here, but i think you know how to add a slow effect withoud help:D).

However...
What I just made isn't MUI, so you can only use it when there is max 1 Archer in your game with this ability.

Question:

do you need it to be MUI?
 
Level 30
Joined
Dec 6, 2007
Messages
2,228
I dont need it mui for now , thanks. Ill read your suggestion now^^
EDIT: Sounds good but i think there is still a little bug. If the archer cancels his attack before the arrow is shot, and another unit attacks his target the trigger will run aswell. (?)
2nd Edit: Solved the problem, created the spell, thanks for your useful suggestions.
 
Last edited:
Level 19
Joined
Oct 12, 2007
Messages
1,821
I dont need it mui for now , thanks. Ill read your suggestion now^^
EDIT: Sounds good but i think there is still a little bug. If the archer cancels his attack before the arrow is shot, and another unit attacks his target the trigger will run aswell. (?)
2nd Edit: Solved the problem, created the spell, thanks for your useful suggestions.

yw:D
 
Status
Not open for further replies.
Top