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

Poison Percent Chance trigger

Status
Not open for further replies.
Level 3
Joined
Dec 24, 2007
Messages
51
I have very little experience in the trigger editor, and I would like to know how you create a trigger that allows an item carried by a unit to have a chance at slowing and dealing Damage per second along with base damage. It would be greatly appreciated because this is a must have for my map.
 
Level 5
Joined
Aug 23, 2007
Messages
141
  • Poison
    • Events
      • Unit - Is attacked
    • Conditions
      • ((Attacking unit) has (Poisoning Item)) Equal to True
    • Actions
      • Set PoisonInteger = (Random integer number between 0 and 101)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PosionInteger Less than or equal to 30
        • Then - Actions
          • Unit - Create 1 Dummy Unit for Owner of (Attacking unit) at (Position of (Attacked unit)) facing Default building facing degrees
          • Unit - Add a 1 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Neutral - Poison Arrows (Attacked unit)
        • Else - Actions
          • Do Nothing

The dummy unit should have an attack of at least 1 damage, and attack 1 should be enabled. it should have a modified poison arrows ability.
 
Last edited:
Level 4
Joined
Feb 25, 2008
Messages
58
Yeah I'd have to agree with raft, this sounds like an orb effect to me. I'd go about this by modifying Slow Orb, since it has the % chance thing you were talking about, and changing the ability it casts to something like poison orb or something of that nature. Alternatively, if you don't want to have the item have an orb effect (since they don't stack) Altazen's trigger looks fairly clean. Keep in mind though that the Unit - A unit is attack event is very sketchy, since the event fires BEFORE damage is taken into account. The only real way I know of to get by this problem is using JASS, and being the complete and utter failure I am, my knowledge is extremely limited on the subject. I'm sure however, that some very kind and wise member of the Hive that knows the language would be more than happy to help you (for a couple of rep points of course!)

Anyways, hope this clears things up a bit, and GL with your map!
-NS
 
Level 7
Joined
Oct 5, 2007
Messages
118
I also have to agree with Raft and Nightsong: This Item can be maked totaly without any triggering. Just use a modified 'Slow Orb' ability and as (so called) Proc ability something like acid bomb. And no worry: Proc orb effects (that ones with percentage chance) stack with any other orb effect. For example, if your hero has (orb) lifesteal and gets your item, only at the attack when the poison comes there wont be lifesteal. So, this stacks (at least in some kind)...
 
Level 5
Joined
Aug 23, 2007
Messages
141
Hmm. Crap, I forgot that. I guess I just got used to triggering passive chain lightnings and war stomps when a tower attacks, this sort of code became second nature. Thanks for the reminder though.
 
Level 5
Joined
Aug 23, 2007
Messages
141
Yeah I'd have to agree with raft, this sounds like an orb effect to me. I'd go about this by modifying Slow Orb, since it has the % chance thing you were talking about, and changing the ability it casts to something like poison orb or something of that nature. Alternatively, if you don't want to have the item have an orb effect (since they don't stack) Altazen's trigger looks fairly clean. Keep in mind though that the Unit - A unit is attack event is very sketchy, since the event fires BEFORE damage is taken into account. The only real way I know of to get by this problem is using JASS, and being the complete and utter failure I am, my knowledge is extremely limited on the subject. I'm sure however, that some very kind and wise member of the Hive that knows the language would be more than happy to help you (for a couple of rep points of course!)

Anyways, hope this clears things up a bit, and GL with your map!
-NS

If I'm correct, the event Unit - Recieves damage is only for specific units. But I recall some JASS code somewhere in THW that did exactly this for a generic unit. If you find it, then problem solved. Because, yes, unfortunately, the Unit is attacked event sucks dirt -- hard.
 
Level 7
Joined
Oct 5, 2007
Messages
118
Not at THW but anyways without leaks... http://www.wc3jass.com/viewtopic.php?t=2608

And: To check if a unit was damged by an attack you have to use an buff-giving orb effect and remove that buff on damaging, if the damaged unit has it. And if the unit has this buff (on damaging), it was damaged by an attack.
 
Level 3
Joined
Mar 2, 2008
Messages
62
the easiest way to do this, as has been said by raft_pl, Nightsong and XieLong, would be to use the Orb of Slow ability.

Modify the % chance to be whatever you need (eg 30).
Set bonus damage to 0.
And make a custom ability (e.g Shadow Strike) for the slow and DPS effect.
Set the ability being cast in thr Oeb of Slow, and add the Orb ability to the item.
 
Level 5
Joined
Aug 23, 2007
Messages
141
*Sigh* Yes, Metov, I think 3 posts in a row have cleared that out. still, it can't hurt to recal previous suggestions. lol.

Xielong... You're saying it's possible to check for attack damage in GUI? neat. If so, could you post a sample trigger with that?
 
Level 7
Joined
Oct 5, 2007
Messages
118
Ok, it's quite simple. Just follow the implementation instruction posted in the system I linked. Than add the following trigger to the function which will run all 'Any Unit Takes Damage'-trigger. And that's the trigger:
  • Any Unit takes Damage
    • Events
    • Conditions
      • ((Triggering unit) has buff <OrbBuff>) Gleich True
    • Actions
      • Unit - Remove <OrbBuff> buff from (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less or Equal to <% Chance>
        • Then - Actions
          • < Create Dummy, Order Dummy, you know the whole staff from the attack trigger>
        • Else - Actions
That's it. Nothing more :)
 
Level 3
Joined
Dec 24, 2007
Messages
51
I'l test these out and get back to you guys. What I'm trying to accomplish is to get the ability from DotA that the weapon Sange has. I'll post on what I think works best.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
or Orb of Lightning

Orb of Lightning Casts the spell you choose in object editor on target when attacking with a chance (however you need to order to attack or make a trigger that orders)
 
Level 12
Joined
Aug 18, 2006
Messages
1,193
I also have to agree with Raft and Nightsong: This Item can be maked totaly without any triggering. Just use a modified 'Slow Orb' ability and as (so called) Proc ability something like acid bomb. And no worry: Proc orb effects (that ones with percentage chance) stack with any other orb effect. For example, if your hero has (orb) lifesteal and gets your item, only at the attack when the poison comes there wont be lifesteal. So, this stacks (at least in some kind)...
actually, this is not true

try giving a Paladin the Item Life Steal ability and the Orb of Slow ability and make it attack a Footman

the Paladin will only gain life from the Item Life Steal and will never cast Orb of Slow(even if it is on 100%)
 
Status
Not open for further replies.
Top