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

[Solved] Boss Run Event

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,601
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: 57
Status
Not open for further replies.
Top