Dummy units help

Rakaesa

Member
Reaction score
5
Okay, I have never used dummy units before but I do generally understand them after a thread I made quite a while back had been answered. I know you create the dummy unit and give it the model you want for the spell or event, and any auras you might need on it. But there's one thing I still don't understand how to do with dummy units.

How do you figure out exactly where to create the dummy unit?

You have your hero, right? So how do you say create 5 dummy units in a line to his right, left, down and up sides. Or even more complicated, make some kind of big shape around him like a star or circle? I don't understand how to place them exactly where you want them to be, or how to measure the distance of how far from the hero they are. Any help?
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
set pointVar = position of your unit
set pointVar2 = pointVar offset by distance towards your angle (For example offset by 200 towards 90 degrees (top, or north)
set pointVar3 = pointVar2 offset by distance towards your angle (For example offset by 400 towards 90 degrees (top, or north)
set pointVar4 = pointVar3 offset by distance towards your angle (For example offset by 200 towards 270 degrees (bottom, or south)
set pointVar5 = pointVar4 offset by distance towards your angle (For example offset by 200 towards 0 degrees (right, or east)
set pointVar6 = pointVar4 offset by distance towards your angle (For example offset by 200 towards 180 degrees (left, or west)

This makes a cross infront of the to the north of the caster.
 

Rakaesa

Member
Reaction score
5
Right, bit confusing but I see what you're saying and sort of see how to do it. That would require lots of point variables for more complex spells. But if it always does only north, that'll be a little annoying. So lets say I wanted a dummy spell to be facing wherever the hero itself is facing, how would I do THAT kind of dummy spell?
 

jackall

You can change this now in User CP.
Reaction score
37
use GetUnitFacing(hero) to get the angle a given unit is facing
 

Rakaesa

Member
Reaction score
5
Right. Ty both, +rep, and Happy New Years :D

Edit: Erm..How do I add rep with this new layout? lol

Edit2: Erm, also, I can't seem to find the trigger you just suggested to me to get the angle that the hero is facing >_< Where is it?
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Frankly, you'll need a point for every dummy unit you want to create. But you can simplify it using loops. For example

set IntegerVar = 8(number of points you want in a round)

For loop integer A from 1 to IntegerVar
set PointVar = position of unit offset by 500 towards 45.00 x I2R(Integer A)

This creates a circle centered at your unit.
 

Rakaesa

Member
Reaction score
5
Yay I can post again, I can't find the Getunitfacing(Hero) trigger (I can't find it). Is it JASS? If so, I have never used Jass before and don't intend to anytime soon, so I hope there's a way to do this in GUI.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
You can enter JASS functions into GUI by using custom scripts, but there is a GUI way. set angle = facing angle of unit
 

jackall

You can change this now in User CP.
Reaction score
37
its a real comparison(condition) and to use that real you use the Unit - Facing Angle of (Unit)

off: about the rep, its the 6-pointed star on the bottom-left side of a posting
 

Rakaesa

Member
Reaction score
5
Okay, I got everything to work on the spell but one thing. It's called Wave of Destruction, based off of Shockwave. The shockwave spell shoots foward at first, and then behind it every .5 seconds an explosion is supposed to occur every 50 range at the angle the hero was facing when he casted it. I made the dummy unit and set its model as the Flame Strike explosion one (Not just the green effect that happens on the ground), but the model/animation doesnt seem to happen. I've tried using play animation stand and birth as an extra action for each dummy unit after they're created, but it just doesn't seem to work. What do I need to do to get the flamestrike animation to show up?
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Why don't you just create special effect at point?
 

jackall

You can change this now in User CP.
Reaction score
37
i agree with skyblader, that should be a SFX, dummies are not supposed to have any models
 

Rakaesa

Member
Reaction score
5
Ah, alright then. I didn't know if special effect at point would work properly either, and I thought you could give the dummy unit the model. I'll do it the special effect way then. (Btw this isn't for a real map, i'm just testing out the whole dummy spell/custom spell thing to get used to it for future maps)

Edit: Erm, doesn't work, because I want the effect to do damage around itself which is why I had used a unit, because there's a Unit - Damage area trigger, but none for a special effect.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top