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

Evade system

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
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,219
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:
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?
 
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
 
Level 20
Joined
Jul 12, 2010
Messages
1,735
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 *_*
 
Status
Not open for further replies.
Top