Unit facing

PandaBear

New Member
Reaction score
3
I want to create an ability kinda in the DotA spell Ice Wall style, it creates a wall wherever the unit is looking at (facing angle). How can I create this wall in GUI?

Sorry if it's confusing, I just don't know how to explain that bether..
 

Shura

New Member
Reaction score
45
So what exactly is this wall supposed to be? Would it be some sort of unit, or doodad of some sort? Well anyway, when your choosing the position of the wall to be in, use Point with Polar Offset, and use Unit Facing Angle when you need to enter an angle.
 

PandaBear

New Member
Reaction score
3
Well the wall would be made Dummy Units with some cool model :D

Here is a pic of what i want to do (notice that I suck with photoshop :p)

imagedv.jpg


The A would be the casting unit, the arrow shows the facing angle of the A unit and the r line would be the wall
 

Shura

New Member
Reaction score
45
Well you would want to do something along the lines of
Trigger:
  • trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your Ability
    • Actions
      • Unit - Create 1 Your Unit for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by 300.00 towards (Facing of (Triggering unit)) degrees) facing Default building facing degrees
 

PandaBear

New Member
Reaction score
3
Hm...

This would create 1 unit right? Here is where im stuck: how can I create the other units, in the line shown on the picture above?
 

Shura

New Member
Reaction score
45
You would need to add or subtract from the facing angle and increase the distance from the caster for each new unit. You'll have to experiment to find out exactly how far you need to adjust each unit.
 

PandaBear

New Member
Reaction score
3
Guess I'll have to find a formula using the distance and angle to find the perfect position...

@Edit
Finally did it! Thanks for your help!
 

Psiblade94122

In need of sleep
Reaction score
138
i see you finally did it but.... theres an easier way then trial and error

Get the point of somewhere directly infront of the caster, this will be our base point
Get the angle of the caster to the point, this will be our base angle
Make a loop for however big you want the wall, make sure the starting number is a negitive of the ending number (IE -12 ~ 12)
Set point 2 based off of Point 1 with a polar offset of 64 (this real offset can be whatever you want) x The integer loop your with a polar offset angle + 90 (4got if this was to the unit's left of right, dosent really matter itll make it a line anyways>
Make the "ice" unit at point 2
Add whatever you want, abilities, durations, coloring of the unit blah blah
Remove point 2 from the game
end loop
Remove point 3 from the game

This will basically take the point onfront of your caster, and make a line base on what angle he is facing (the offset in reality is a constant, +90 of any angle will be to the left (or was it right) of your inital angle. From there the negitive integer in the loop will take care of the other side of the line.)
 

PandaBear

New Member
Reaction score
3
i see you finally did it but.... theres an easier way then trial and error

Get the point of somewhere directly infront of the caster, this will be our base point
Get the angle of the caster to the point, this will be our base angle
Make a loop for however big you want the wall, make sure the starting number is a negitive of the ending number (IE -12 ~ 12)
Set point 2 based off of Point 1 with a polar offset of 64 (this real offset can be whatever you want) x The integer loop your with a polar offset angle + 90 (4got if this was to the unit's left of right, dosent really matter itll make it a line anyways>
Make the "ice" unit at point 2
Add whatever you want, abilities, durations, coloring of the unit blah blah
Remove point 2 from the game
end loop
Remove point 3 from the game

This will basically take the point onfront of your caster, and make a line base on what angle he is facing (the offset in reality is a constant, +90 of any angle will be to the left (or was it right) of your inital angle. From there the negitive integer in the loop will take care of the other side of the line.)

How would this be in the Trigger Editor? I'm trying to do this way but somehow its making a square :eek:
 
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