• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Hero Detector Ping

Status
Not open for further replies.
Level 16
Joined
Aug 20, 2009
Messages
1,552
can anybody help me with this system?...
i am using this system for my map.

so...

you got 1 hero,

if some hero from enemy team came in range of 1300 of your hero,

you will be pinged of its position (Warning Ping style) for 2 seconds. and for all your friendly team mates.

Then, a sound will be played for you, and your allies. (i got the sound.)

invisible unit will not be pinged in your minimap when it comes in range.

is that understand able?
 
Level 16
Joined
Aug 20, 2009
Messages
1,552
okay, make a test map for me :D,maybe your version is better, the only prob i got is actually playing the sound to only "Friendly Team mates", i made the rest already...

  • HeroDetector Init
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Trigger - Add to HeroDetector Function <gen> the event (Unit - A unit comes within 1300.00 of (Triggering unit))
  • HeroDetector Init 2
    • Events
      • Time - Elapsed game time is 0.50 seconds
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
        • Loop - Actions
          • Trigger - Add to HeroDetector Function <gen> the event (Unit - A unit comes within 1300.00 of (Picked unit))
  • HeroDetector Function
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A Hero) Equal to True
          • ((Triggering unit) is alive) Equal to True
          • ((Triggering unit) has buff Invisibility) Equal to False
          • ((Triggering unit) has buff Invisibility (Extra)) Equal to False
          • ((Triggering unit) is an illusion) Equal to False
        • Then - Actions
          • Cinematic - Ping minimap for (All enemies of (Owner of (Triggering unit))) at (Position of (Triggering unit)) for 2.50 seconds, using a Warning ping of color (100.00%, 100.00%, 100.00%)
          • Custom script: if GetOwningPlayer(GetTriggerUnit()) == GetLocalPlayer() then
          • Sound - Play HeroDetectSensor <gen>
          • Custom script: endif
        • Else - Actions
well, the sound plays, even if the unit is an ally(incoming unit),how do i make it only enemy units?. and i haven't test it out on what is going on with the enemy side, so, if there is problem within my triggers, please fix, i want the sound to only play and pings,if enemy unit comes within range, for all allies.
 
Level 16
Joined
Aug 20, 2009
Messages
1,552
umm, so you can use Entering unit for Reffering to Unit in range? lol,, i just knew that, Thx!! +REP for both :D

EDIT : OMG...IT doesn't work...entering unit does not refer to the unit in range!! D: D: D: ...
To refer for unit in range, we should use "Triggering unit".. and i can't seem to Solve this, on how to refer to the unit which is the main cause of the event...

Unit is within 1300 range of "Unit X"

i don't know how to refer to that unit x, if i could...i could easily solve this...
 
Level 16
Joined
Aug 20, 2009
Messages
1,552
yeah, i use triggering unit, but it only refer to the unit coming in range...

i want something that can refer to the unit that works as the center of the Unit in range event.

and as i say, i want it to somehow only work if the Allied heroes is the one coming in range. (the sound)

the only problem to fix is actually the Custom script, if i could somehow make it play the sound for enemies of triggering unit.
 
Alright, done.
It works like this:
You pick up the Battle Standard item and it pings the minimap, whenever a hero is within 1300 range. If you leave that hero's range after 1400 (so that the system won't collapse or collide with the 1300 value) distance, that hero can be detected again. Dropping the item will stop the effect. I just didn't know how you wanted to initialize the effect, so I used an item for it.
 

Attachments

  • Ping Minimap.w3x
    20.3 KB · Views: 65
Level 16
Joined
Aug 20, 2009
Messages
1,552
he prevented the creation of playergroup, to evade possible leaks from groups that is undestroyable, that is why he created this, and yeah, i came of the idea of using periodic event too, somehow leak is more possible with player group, so, i will stick with Pharaoh, thx for the support! :D
 
Status
Not open for further replies.
Top