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

How to set unit life lower 800life

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
What ?
Move back for a distance = Retreats ?

EDIT:
IF "Retreat" action is you want, then do this

  • Retreats
    • Events
      • Unit - Shadow Hunter 0001 <gen>'s life becomes Less than or equal to 350.00
    • Conditions
    • Actions
      • Set RetreatingArea = (Center of Region 000 <gen>)
      • Unit - Order Shadow Hunter 0001 <gen> to Move To RetreatingArea
      • Custom script: call RemoveLocation(udg_RetreatingArea)
I've uploaded test map to make you understand
 

Attachments

  • Retreating.w3x
    12.4 KB · Views: 87
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

As I remember, we got this "fallback-thing" already, I posted this way.

  • Fallback
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Life of (Triggering unit)) Less than or equal to (<=) 10.00
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Set TempPoint1 = (Position of (Triggering unit))
          • Set TempPoint2 = (TempPoint1 offset by 256.00 towards ((Facing of (Triggering unit)) - 180.00) degrees)
          • Unit - Order (Triggering unit) to Move To TempPoint2
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint1)
      • Custom script: call RemoveLocation(udg_TempPoint2)
Note:
In the first condition, you can set the life, WHEN the unit should fallback.

The If-Then-Else - I leave the If condition there, because in this you can be
more specified and can set the units in, who should fallback only (unit type)

In the If-Then-Else the TempPoint2 you see 256.00. This is the DISTANCE from the current unit position and the fallback point.

Greetings
~ The Bomb King > Dr. Boom
 
Status
Not open for further replies.
Top