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

[Solved] Boss Run Event

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,602
Hello.

I'm right now doing a simple boss event where the boss runs away from the player. I need help with degrees and points.

When the event is activated, the idea is that the boss runs away from player's hero. The event will end when the boss dies or it runs to a corner of the battle arena.

I've coded everything but the running bugs and I don't know a good way to create it. So can you look at the trigger and perhaps do it? Also the running should be a bit random, I mean if player is at 90 degree, the boss doesn't just run to opposite direction(270), but there's a bit random too so he runs between 250 to 290.

At the moment it just runs forward...

  • Run ESCAPE
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set TempLoc = (Position of BOSS)
      • Set TempLoc2 = (Position of AAAPhodom)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (BOSS is dead) Equal to True
              • (Corner 1 <gen> contains BOSS) Equal to True
              • (Corner 2 <gen> contains BOSS) Equal to True
              • (Corner 3 <gen> contains BOSS) Equal to True
              • (Corner 4 <gen> contains BOSS) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Trigger - Turn off Deactivate ESCAPE <gen>
          • Trigger - Turn on Activate ESCAPE <gen>
          • Unit - Order BOSS to Stop
          • Custom script: call RemoveLocation(udg_TempLoc)
          • Custom script: call RemoveLocation(udg_TempLoc2)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between TempLoc and TempLoc2) Greater than or equal to 500.00
            • Then - Actions
              • Unit - Make BOSS face AAAPhodom over 0.30 seconds
              • Unit - Set life of BOSS to ((Life of BOSS) + ((Max life of BOSS) x 0.03))
              • Special Effect - Create a special effect attached to the origin of BOSS using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Custom script: call RemoveLocation(udg_TempLoc)
              • Custom script: call RemoveLocation(udg_TempLoc2)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                • Then - Actions
                  • Set Angle = (Facing of BOSS)
                  • Set TempLoc3 = (TempLoc offset by 1000.00 towards Angle degrees)
                  • Unit - Order BOSS to Move To TempLoc3
                  • Custom script: call RemoveLocation(udg_TempLoc)
                  • Custom script: call RemoveLocation(udg_TempLoc2)
                  • Custom script: call RemoveLocation(udg_TempLoc3)
                • Else - Actions
Map is attached.
 

Attachments

  • BOSS RUN 0.01.w3x
    21.1 KB · Views: 58
Status
Not open for further replies.
Top