[Trigger] Two questions.

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
I have two problems, well questions more like. Is there a way to detect when a unit misses due to evasion? I have a trigger already set up for the same percentage as evasion but its trigger enhanced, and doesnt fire at the same time as evasion. And that leads to my other question: The trigger i have sets the point that moves the hero.
  • Events
    • Unit - A unit Is attacked
  • Conditions
    • (Unit-type of (Attacked unit)) Equal to Imperial Legionaire
    • (Level of Phantom Step for (Attacked unit)) Greater than 0
    • ((Attacking unit) is A structure) Equal to False
  • Actions
    • Set Phantom_Step_int[1] = (Random integer number between 1 and 100)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Phantom_Step_int[1] Greater than 16
      • Then - Actions
        • Skip remaining actions
      • Else - Actions
    • Set Phantom_Step_Uni = (Attacking unit)
    • Set Phantom_Step_uni = (Attacked unit)
    • Set Phantom_Step_int[2] = (Random integer number between 1 and 3)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Phantom_Step_int[2] Equal to 1
      • Then - Actions
        • Set Phantom_Step_LOC = ((Position of Phantom_Step_Uni) offset by 2.00 towards 120.00 degrees)
        • Unit - Move Phantom_Step_uni instantly to Phantom_Step_LOC
        • Unit - Set life of Phantom_Step_Uni to ((Life of Phantom_Step_Uni) - 100.00)
        • Custom script: call RemoveLocation(udg_Phantom_Step_LOC)
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Phantom_Step_int[2] Equal to 2
      • Then - Actions
        • Set Phantom_Step_LOC = ((Position of Phantom_Step_Uni) offset by 2.00 towards 240.00 degrees)
        • Unit - Move Phantom_Step_uni instantly to Phantom_Step_LOC
        • Unit - Set life of Phantom_Step_Uni to ((Life of Phantom_Step_Uni) - 100.00)
        • Custom script: call RemoveLocation(udg_Phantom_Step_LOC)
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Phantom_Step_int[2] Equal to 3
      • Then - Actions
        • Set Phantom_Step_LOC = ((Position of Phantom_Step_Uni) offset by 2.00 towards 360.00 degrees)
        • Unit - Move Phantom_Step_uni instantly to Phantom_Step_LOC
        • Unit - Set life of Phantom_Step_Uni to ((Life of Phantom_Step_Uni) - 100.00)
        • Custom script: call RemoveLocation(udg_Phantom_Step_LOC)
      • Else - Actions
What i was curious about, is there anyway to set the LOC so that the hero is moved instantly behind its attacker? Any help would be much appreciated.
 
Level 9
Joined
Jun 7, 2008
Messages
440
I have that already. (location of attacked) How do i detect which way the hero is facing? Then do i Do something like :
  • Actions
    • Set LOC = Facing of attacking unit - 180 degress
I don't think that works.
 
Level 8
Joined
Aug 4, 2008
Messages
279
A unit is damaged.
Triggering unit equal to your unit
set temploc = position of attacking unit offset by 70 towards (facing of attacking unit -180) degrees.
unit - move attacked unit instantly to to temploc
call removelocation (udg_temploc)
 
Status
Not open for further replies.
Top