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

Radar v1.1

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Sends out a radar to detect enemies. The radar takes 3 seconds to make a complete sweep, and it marks any enemies it encounters.

  • Variables
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set hashtable = (Last created hashtable)
      • -------- Set the distance between each wave of the radar. This should be a little bit smaller than the truesight range. --------
      • Set distance = 39.00
      • -------- Set the number of units in the sweep. The total area of effect will be distance multiplied by number --------
      • -------- If you add more levels make sure to extend the array farther --------
      • Set number[1] = 12
      • Set number[2] = 16
      • Set number[3] = 20
  • Radar Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Radar
    • Actions
      • Set caster = (Triggering unit)
      • Set point1 = (Position of caster)
      • Set angle = (Facing of caster)
      • Set level = (Level of Radar for caster)
      • Set timer = 3.06
      • Set totaldistance = distance
      • For each (Integer i) from 1 to number[level], do (Actions)
        • Loop - Actions
          • Set point2 = (point1 offset by totaldistance towards angle degrees)
          • Unit - Create 1 Dummy for (Owner of caster) at point2 facing Default building facing degrees
          • Set dummy = (Last created unit)
          • Custom script: set udg_handle = GetHandleId(udg_dummy)
          • Hashtable - Save totaldistance as 1 of handle in hashtable
          • Hashtable - Save angle as 2 of handle in hashtable
          • Hashtable - Save timer as 3 of handle in hashtable
          • Hashtable - Save Handle Ofcaster as 5 of handle in hashtable
          • Unit Group - Add dummy to radargroup
          • Set totaldistance = (totaldistance + distance)
          • Custom script: call RemoveLocation(udg_point2)
      • Trigger - Turn on Radar Loop <gen>
      • Custom script: call RemoveLocation(udg_point1)
  • Radar Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in radargroup and do (Actions)
        • Loop - Actions
          • Set dummy = (Picked unit)
          • Custom script: set udg_handle = GetHandleId(udg_dummy)
          • Set timer = (Load 3 of handle from hashtable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • timer Less than or equal to 0.00
            • Then - Actions
              • Unit - Remove dummy from the game
              • Unit Group - Remove dummy from radargroup
              • Hashtable - Clear all child hashtables of child handle in hashtable
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in radargroup) Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
              • Set caster = (Load 5 of handle in hashtable)
              • Set totaldistance = (Load 1 of handle from hashtable)
              • Set angle = ((Load 2 of handle from hashtable) + 3.60)
              • Set point1 = (Position of caster)
              • Set point2 = (point1 offset by totaldistance towards angle degrees)
              • Unit - Move dummy instantly to point2
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within 120.00 of point2 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of dummy)) Equal to True)))) and do (Actions)
                • Loop - Actions
                  • Unit - Order dummy to Night Elf Druid Of The Talon - Faerie Fire (Picked unit)
              • Hashtable - Save angle as 2 of handle in hashtable
              • Hashtable - Save (timer - 0.03) as 3 of handle in hashtable
              • Custom script: call RemoveLocation(udg_point1)
              • Custom script: call RemoveLocation(udg_point2)
Keywords:
Radar
Contents

Just another Warcraft III map (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Radar v1.1 | Reviewed by Maker | 10th Mar 2013 NEEDS FIX The ability is MUI The ability is leakless The ability has a fitting effect The tooltip is nice...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.


Radar v1.1 | Reviewed by Maker | 10th Mar 2013
NEEDS FIX


126248-albums6177-picture66521.png


  • The ability is MUI
  • The ability is leakless
  • The ability has a fitting effect
  • The tooltip is nice
126248-albums6177-picture66522.png


  • The ability does not detect all units.
    I placed 100 peasants near the caster and 7 were left without the buff
126248-albums6177-picture66523.png


  • The importing instructions could say that the ability and dummy need to be set
    correctly in the trigger, as the can refer to wrong objects when
    importing the ability into another map
  • You could rename the hashtable variable, the name is too generic
  • Increase the follow through time a bit
  • You could null the location variables you remove to avoid
    minor leaks
[tr]




Radar v1.0 | Reviewed by Maker | 6th Mar 2013
NEEDS FIX


126248-albums6177-picture66521.png


  • The ability is MUI
  • The ability is leakless
  • The ability has a fitting effect
  • The tooltip is nice
126248-albums6177-picture66522.png


  • The ability does not detect invisible units
126248-albums6177-picture66523.png


  • The importing instruction could say that the ability and dummy need to be set
    correctly in the trigger, as the can refer to wrong objects when
    importing the ability into another map
  • Radar Loop should be initially off
  • You could rename the dummy Faerie Fire ability
    so it is not confused with the original
  • You might not need to order the dummy to cast FF on itself
  • Increase the follow through time a bit
[tr]
 
Level 16
Joined
Apr 4, 2011
Messages
995
Updated to v1.1

Changed the fearie fire name, changed the importing instructions, fixed a few redundancies in the code.

I played for about 15 minutes with different methods of invisible detection but none of them would work (including truesight, wards, dust, and farsight). The truesight would "lag", and by the time the invisible unit was visible the wave had already passed. I couldn't find a real solution to this problem. As it is, the radar is currently a visible units only ability.
 
Top