• 🏆 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!
  • ✅ HD Level Design Contest #1 POLL is now OPEN! Check out the stunning visuals of the final entries. 🔗Click here to cast your vote!

Evade system

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,181
i get it, give me some secs

ahh yea i think this should work
EDIT this works but i need to work some with it dont add it yet
  • combat mode
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • combatmode[(Player number of (Owner of (Attacking unit)))] Equal to False
              • combatmode[(Player number of (Owner of (Attacked unit)))] Equal to False
        • Then - Actions
          • Game - Display to (Player group((Owner of (Attacked unit)))) the text: |CFFFF0303System|R ...
          • Game - Display to (Player group((Owner of (Attacking unit)))) the text: Your now in combat ...
          • Set combatmode[(Player number of (Owner of (Attacking unit)))] = True
          • Set combatmode[(Player number of (Owner of (Attacked unit)))] = True
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • combatmode[(Player number of (Owner of (Attacking unit)))] Equal to True
              • combatmode[(Player number of (Owner of (Attacked unit)))] Equal to True
        • Then - Actions
          • Wait 10.00 seconds
          • Game - Display to (Player group((Owner of (Attacked unit)))) the text: |CFFFF0303System|R ...
          • Game - Display to (Player group((Owner of (Attacking unit)))) the text: |CFFFF0303System|R ...
          • Set combatmode[(Player number of (Owner of (Attacked unit)))] = False
          • Set combatmode[(Player number of (Owner of (Attacking unit)))] = False
          • Unit - Reset ability cooldowns for (Attacking unit)
          • Unit - Set life of (Attacking unit) to 100.00%
          • Unit - Set mana of (Attacking unit) to 100.00%
          • Unit - Reset ability cooldowns for (Attacked unit)
          • Unit - Set life of (Attacked unit) to 100.00%
          • Unit - Set mana of (Attacked unit) to 100.00%
        • Else - Actions
 
Level 10
Joined
Nov 24, 2010
Messages
546
Thank you :) i am waiting :)

i get it, give me some secs

ahh yea i think this should work
  • combat mode
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • combatmode[(Player number of (Owner of (Attacking unit)))] Equal to False
              • combatmode[(Player number of (Owner of (Attacked unit)))] Equal to False
        • Then - Actions
          • Game - Display to (Player group((Owner of (Attacked unit)))) the text: |CFFFF0303System|R ...
          • Game - Display to (Player group((Owner of (Attacking unit)))) the text: Your now in combat ...
          • Set combatmode[(Player number of (Owner of (Attacking unit)))] = True
          • Set combatmode[(Player number of (Owner of (Attacked unit)))] = True
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • combatmode[(Player number of (Owner of (Attacking unit)))] Equal to True
              • combatmode[(Player number of (Owner of (Attacked unit)))] Equal to True
        • Then - Actions
          • Wait 10.00 seconds
          • Game - Display to (Player group((Owner of (Attacked unit)))) the text: |CFFFF0303System|R ...
          • Game - Display to (Player group((Owner of (Attacking unit)))) the text: |CFFFF0303System|R ...
          • Set combatmode[(Player number of (Owner of (Attacked unit)))] = False
          • Set combatmode[(Player number of (Owner of (Attacking unit)))] = False
          • Unit - Reset ability cooldowns for (Attacking unit)
          • Unit - Set life of (Attacking unit) to 100.00%
          • Unit - Set mana of (Attacking unit) to 100.00%
          • Unit - Reset ability cooldowns for (Attacked unit)
          • Unit - Set life of (Attacked unit) to 100.00%
          • Unit - Set mana of (Attacked unit) to 100.00%
        • Else - Actions

Trigger seems fine but only Attacked unit (mob witch players attacking) is restoring HP and Mana :) and what are variable types? can you upload me a demo map?
 
Last edited by a moderator:

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,181
Combat mode = Boolrean

Ok here is how it works, bug free of that i tested.

  • combat mode
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Countdown Timer - Start My_timer[(Player number of (Owner of (Attacking unit)))] as a One-shot timer that will expire in 10.00 seconds
      • Countdown Timer - Start My_timer[(Player number of (Owner of (Attacked unit)))] as a One-shot timer that will expire in 10.00 seconds
      • Unit Group - Add (Attacked unit) to My_unit_group_1
      • Unit Group - Add (Attacking unit) to My_unit_group_2
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Combat_mode[(Player number of (Owner of (Attacking unit)))] Equal to False
          • Combat_mode[(Player number of (Owner of (Attacked unit)))] Equal to False
        • Then - Actions
          • Game - Display to (All players) the text: Combat mode on
          • Set Combat_mode[(Player number of (Owner of (Attacked unit)))] = True
          • Set Combat_mode[(Player number of (Owner of (Attacking unit)))] = True
        • Else - Actions
  • reset
    • Events
      • Time - My_timer[1] expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in My_unit_group_1 and do (Actions)
        • Loop - Actions
          • Unit - Set life of (Picked unit) to 100.00%
          • Unit - Set mana of (Picked unit) to 100.00%
          • Unit - Reset ability cooldowns for (Picked unit)
          • Game - Display to (All players) the text: Combat mode off
      • Unit Group - Pick every unit in My_unit_group_2 and do (Actions)
        • Loop - Actions
          • Unit - Set life of (Picked unit) to 100.00%
          • Unit - Set mana of (Picked unit) to 100.00%
          • Unit - Reset ability cooldowns for (Picked unit)
          • Game - Display to (All players) the text: Combat mode off
LINK
 
Last edited:
Level 29
Joined
Mar 10, 2009
Messages
5,016
try this...
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Custom script: set udg_UnitOrder = GetUnitCurrentOrder(GetTriggerUnit())
      • Custom script: if udg_UnitOrder != 851983 or udg_UnitOrder==851990 or udg_UnitOrder==851986 or udg_UnitOrder==null then
      • Unit - Set life of (Triggering unit) to 100.00%
      • Unit - Set mana of (Triggering unit) to 100.00%
      • Custom script: endif
 
Level 10
Joined
Nov 24, 2010
Messages
546
Bump still need help

try this...
Untitled Trigger 001
Events
Unit - A unit Is attacked
Conditions
Actions
Custom script: if udg_UnitOrder != 851983 or udg_UnitOrder==851990 or udg_UnitOrder==851986 or udg_UnitOrder==null then
Huh?
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
the trigger I made works like...

if the attacked unit's order is NONE/not attacking/move/patrol then his health and mana will be refilled...

you may however customize it if the unit moves or runs away...

  • if udg_UnitOrder != 851983 and udg_UnitOrder==851986 or udg_UnitOrder==851990 then
OrderIds;
851983 = attack
851986 = move
851990 = patrol
851971 = attack move
null = no order
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
Here is a tesp map. It's combined Respawn/Evade system since host of this thread required both. Script was made in jass but since most ppl want GUI version to see clearly wants going on, I've moved it to GUI using custom scripts.
 

Attachments

  • EvadeSystem.w3x
    28.3 KB · Views: 58
Last edited:
Level 19
Joined
Jul 12, 2010
Messages
1,713
Here is a tesp map. It's combined Respawn/Evade system since host of this thread required both. Script was made in jass but since most ppl want GUI version to see clearly wants going on, I've moved it to GUI using custom scripts.

awesome, thnx for the system!! :thumbs_up:

since i don't understand most of the things that you did i got a question:
how to make it restore hp only for neutral hostile units?

EDIT:
i tested the system and it's only for neutral hostile so nvm my last post *_*
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
If anyone dled old version, I recommend to download new one. Fixed many issues, improved efficiency and by the way, no one was so smart to see that in Square Root function I put '-' instead of '+'..

System is also selective now, and both (Respawn and Evade) systems have been slit, so importing is now easier (if you need just one).
 
Status
Not open for further replies.
Top