Damage unit close to sliding unit

minikrampan

Ultra Cool Member
Reaction score
28
Trigger:
  • Sliding stuff
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set casting_point = (Position of casting_unit)
      • Unit Group - Pick every unit in Unit_total and do (Actions)
        • Loop - Actions
          • Set real1[(Custom value of (Picked unit))] = (real1[(Custom value of (Picked unit))] + 2.00)
          • Set real1b[(Custom value of (Picked unit))] = (70.00 + real1[(Custom value of (Picked unit))])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • real2[(Custom value of (Picked unit))] Greater than or equal to 360.00
            • Then - Actions
              • Set real2[(Custom value of (Picked unit))] = 0.00
            • Else - Actions
              • Set real2[(Custom value of (Picked unit))] = (real2[(Custom value of (Picked unit))] + 2.50)
          • Set temp_point = (casting_point offset by real1b[(Custom value of (Picked unit))] towards real2[(Custom value of (Picked unit))] degrees)
          • Unit - Move (Picked unit) instantly to temp_point
          • Custom script: call RemoveLocation(udg_temp_point)
      • Custom script: call RemoveLocation (udg_casting_point)


Ok, i have a couple of units sliding around in a spiral kinda. How would i pick units that comes to close to the sliding units and damage them and remove the sliding unit?
Fast solution = +rep
 

crabbb622

New Member
Reaction score
9
the picking part would be an event that a unit comes within range of the sliding unit, then you could put that inside of a conditional and damage the unit and remove the sliding unit afterwards
 

Weegee

Go Weegee!
Reaction score
102
You could just make a trigger that shoots every so and so seconds that checks if units in range are equal or greater then 1. Then set them to a variable and make a "dummy trigger" with all the actions and conditions but without an event. Then add an event when a unit comes in range through the previous trigger. I know this is confusing, I can show you an example when Im done studying
 

Weegee

Go Weegee!
Reaction score
102
Do you want to "remove them" as in stop them from sliding or REMOVE them from the game
 

Psiblade94122

In need of sleep
Reaction score
138
in other words a collision system
Hmm how i would do it is to give every unit phenixe fire that only target dummy projectiles (would only cause problems if hp bar is always on)
When the projectile dies, then damage the killing unit
 

kingkwong92

Well-Known Member
Reaction score
25
action - pick every unit within X range of (your unit)
- loop
If all conditions are true then / else
- If picked unit equals (your conditions)
-Damage matching unit by X amount from (your unit)
- Explode (your unit)
 

Cloak_Master

Active Member
Reaction score
41
Trigger - Add to Untitled Trigger 001 <gen> the event (Unit - A unit comes within 100.00 of (Last created unit))

Add that to a trigger with the approiate actions and no events. This way you can provide specific functions to units as you create them.
 

istar

New Member
Reaction score
31
Ok, i have a couple of units sliding around in a spiral kinda. How would i pick units that comes to close to the sliding units and damage them and remove the sliding unit?
Fast solution = +rep
why all solution seems so troublesome?
just base the sliding unit on landmines
it will explode(hence removed) and damage surrounding units, easy!
 

istar

New Member
Reaction score
31
actually there is a slight potential problem i just thought of
if the mines wont explode, it may be due to this
Trigger:
  • Unit - Move (Picked unit) instantly to temp_point

the GUI trigger actually pauses the unit before moving them, this may cancel the casting of the explosion ability
note: may, it may or may not work
if it work ok, then forget what i said
if it doesnt, i have a simple solution for it, but its in JASS
JASS has another function that adjust unit position without pausing it first which unfortunately GUI has no access to
if it fails, post again
 

minikrampan

Ultra Cool Member
Reaction score
28
It does work, But i won't be using it because you cant control the damage trough triggers, Well you can by creating diffrent dummy units but i won't be doing that,

If you see it from this angle, How would you make the damage in a nova spell ? its the same thing isnt it?
 

istar

New Member
Reaction score
31
i could use a unit-dies trigger
if landmine dies, do something
what is it that you want?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top