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

Help w/ Projectile

Status
Not open for further replies.

sentrywiz

S

sentrywiz

I've always wanted to know this but never really knew how to do it, completely?

A way to explain this is (for you that have played any skillshot maps, but not pudge) how to make a single dummy unit, have him move to a target location and when an enemy comes close to it, to be damaged and the dummy unit destroyed.\\

Think, Warlock map Fireball spell without the knockback.

1)dummy created at caster loc
2)dummy set to move to target loc
3)dummy moves
4) how to make dummy to damage any unit near it? Unit near unit range event doesn't work... atleast i dont know how.
 
Level 7
Joined
Jun 15, 2010
Messages
218
You could make a trigger

Event unit in range
condition in rage of unit type (fireboltdummy)
unit kill matching unit
damage area - matching unit damage bla bla bla
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Periodically pick units in range of the dummy. When the dummy is created, add it to a unit group.

Filter out unwanted units from the unit group.

  • Untitled Trigger 017
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Group and do (Actions)
        • Loop - Actions
          • Set u1 = (Picked unit)
          • Set p1 = (Position of u1)
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within 64.00 of p1 matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of *caster*)) Equal to True))) and do (Actions)
            • Loop - Actions
          • Custom script: call RemoveLocation(udg_p1)
 

sentrywiz

S

sentrywiz

Periodically pick units in range of the dummy. When the dummy is created, add it to a unit group.

Filter out unwanted units from the unit group.

  • Untitled Trigger 017
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Group and do (Actions)
        • Loop - Actions
          • Set u1 = (Picked unit)
          • Set p1 = (Position of u1)
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within 64.00 of p1 matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of *caster*)) Equal to True))) and do (Actions)
            • Loop - Actions
          • Custom script: call RemoveLocation(udg_p1)

Oh sweet. Thanks

Now only one thing remains - how to destroy the picked unit once he deals damage?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Well you could do it like this:

  • Set group = (Units within ...
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (group is empty) Equal to False
    • Then - Actions
      • Unit Group - Pick every unit in group and do (Actions)
        • Loop - Actions
          • Unit - Cause *unit* to damage (Picked unit), dealing ...
      • Unit - Remove (Picked unit) from the game
    • Else - Actions
  • Custom script: call DestroyGroup(udg_group)
 

sentrywiz

S

sentrywiz

I guess its simpler to just make it a damaging shockwave and set an expiration timer.
I like where its going.
I think I can trigger, find my solution myself.

Thanks for your help, you've explained lot to me.
+rep
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
You could also create a dummy unit, order the said unit to got to a desired location, then check if the unit has arrived, if so, kill the unit.

You would need a custom land mine ability for this, either you add it on run-time or use the object editor to add it to a unit. You also need to add the locust ability to the unit so it wouldn't have pathing problems and would be unselectable.
 

sentrywiz

S

sentrywiz

You could also create a dummy unit, order the said unit to got to a desired location, then check if the unit has arrived, if so, kill the unit.

You would need a custom land mine ability for this, either you add it on run-time or use the object editor to add it to a unit. You also need to add the locust ability to the unit so it wouldn't have pathing problems and would be unselectable.

I already know its supposed to be locust. No problem there

Care to explain or even trigger it just to show?

I actually just submitted a projectile system lol, so if you want that...

I'll check it out then :)
 
Status
Not open for further replies.
Top