• 🏆 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] DOTA Deny system problem

Status
Not open for further replies.
Level 7
Joined
May 23, 2011
Messages
179
Guys sorry for the disturbance but i need help..... My deny system did not work... I even used variables but it did not work.... What me do??
  • AI Deny Rebellion
    • Events
      • Unit - A unit comes within 1000000000.00 of Cheftain's Camp 0034 <gen>
    • Conditions
      • (Percentage life of (Triggering unit)) Less than or equal to 15.00
      • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
      • (Owner of (Attacking unit)) Equal to (Random player from (All allies of Player 12 (Brown)))
      • ((Triggering player) controller) Equal to Computer
    • Actions
      • Unit - Order (Attacking unit) to Attack (Triggering unit)
JASS:
//Thanks a lot......
:goblin_yeah:
 
Level 9
Joined
Dec 12, 2007
Messages
489
  • Conditions
    • (Percentage life of (Triggering unit)) Less than or equal to 15.00
    • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    • (Owner of (Attacking unit)) Equal to (Random player from (All allies of Player 12 (Brown)))
    • ((Triggering player) controller) Equal to Computer

there is no event that reference to "Attacking Unit" and "Triggering Player" in your event, you need to work around it, as if your condition is not fulfilled, the action is nothing.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
What I understand:
1. You cannot attack/damage/kill ally unit if the targeted unit's HP is greater than 15% of its current health.
2. You can deny ally unit when its HP is less than or equal to 15%.
3. The denying unit will get 50% gold from the denying process.

Is this all correct for all your statement ?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Deny System
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Triggering unit) belongs to an ally of (Owner of (Attacking unit))) Equal to True
      • (Percentage life of (Triggering unit)) Greater than 15.00
    • Actions
      • Unit - Order (Attacking unit) to Stop
The trigger above will prevent an ally attacking an ally IF the attacked unit's HP is greater than 15%
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,200
You need 2 triggers.
1. Runs when you order to attack the restrictions get applied on a unit is attacked event.
2. Runs when you kill a unit and credits the denier appropiatly.

The event you used makes no sense as...
"Unit - A unit comes within 1000000000.00 of Cheftain's Camp 0034 <gen>"
has nothing to do with killing or attacking.
 
Level 7
Joined
May 23, 2011
Messages
179
I have now the triggers but the problem is the reward when you deny....... When you kill it.... ( ex. when you attack an ally you will gain 75% of its profit instead of the amount of gold shown overhead it will be " ! " ) Its hard to make that..... Please help im done with the first part..... I just modifies the work of Defskull and added some variables and Triggers on it...... How will it goes?
 
Status
Not open for further replies.
Top