HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

On dummy casters

04-02-2007, 09:43 AM#1
blu_da_noob
So I was trying some stuff earlier today, because I wanted to find a way to make casters change their facing angle instantly. Still haven't been able to do that, but along the way I discovered something useful.

Previously, to have a single dummy cast an ability on many units instantly, you had to make it move to every one (SetUnitX/Y) before casting. In the course of my investigations I found that removing the move ability from a unit ('Amov') stops its rotation and allows it to cast in any direction without rotating (which is why SetUnitX/Y had to be used). It also allows it to cast instantly in any direction without rotating (with appropriate cast backswing etc). I checked and it still allows movement with SetUnitX/Y and the model updates correctly.

Then I realised you wouldn't be able to rotate your dummies for missiles. But fortunately the oddities continue and a simple SetUnitTurnSpeed (used GUI, haven't checked JASS equivalent) resets that.

Conclusion to ramble: remove 'Amov' from your dummy and set its turn speed back to what it was and you don't need to make it face certain angles or move on to units to cast spells (useful for casting shockwave type spells in certain directions, for example, as previously it would have a slight delay as it turned). I checked and instant casting is maintained after it is enabled to rotate again. (Obviously this disables walk movement of the dummy, but I don't think that's used too often :P)

Um yeah. And it saves SetUnitX/Y function calls? :> (oh, and GetUnitX/Y function calls too, at that. wootness)

Edit: heh yeah, I got a footman to cast 20 shockwaves in a circle around himself instantly
So this means you would only ever need one dummy unit to cast spells for the entire map?
04-02-2007, 11:16 AM#2
Rising_Dusk
Quote:
So this means you would only ever need one dummy unit to cast spells for the entire map?
So I guess this is a good excuse to feed you that rep then, eh?

Also, random thoughts.
Does this work for attacking too?
Can I order a dummy unit without the 'Amov' ability to attack multiple things instantly assuming the animation speeds are set appropriately?

This is an awesome find.
Especially because half the shit in my map that lags is because of like 50 dummy units being spawned every 2 seconds or some crap.
You might have just saved lag beam, too. xD
04-02-2007, 11:18 AM#3
blu_da_noob
Quote:
Originally Posted by Rising_Dusk
Also, random thoughts.
Does this work for attacking too?
Can I order a dummy unit without the 'Amov' ability to attack multiple things instantly assuming the animation speeds are set appropriately?

Pretty sure minimum attack cooldown is 0.1 seconds, so I don't think so.

Quote:
You might have just saved lag beam, too. xD

xD
04-02-2007, 03:27 PM#4
Mezzer
Quite use full, and it's sure to improve the appearance and execution of most custom spells. Nice find!
04-02-2007, 03:49 PM#5
Vexorian
Why should it improve anything else than performance. I mean, seriously?

One caster would be nice if it wasn't for all those channeling abilities and those damage over time abilities. You mentioned shockwave, you would have to keep that caster owned by the correct player until all the shockwaves end.
04-02-2007, 03:55 PM#6
blu_da_noob
One permanent caster per player. And obviously there isn't much you can do about channeling abilities, but this never was relevant for those anyway.
04-02-2007, 09:22 PM#7
blu_da_noob
Maximum turning speed is dependant on the model?
04-02-2007, 10:14 PM#8
blu_da_noob
I did some rudimentry tests with a footman and it appears that even SetUnitLookAt takes some time to rotate the head/chest. It's less than normal rotation, but certainly not instant :/
04-02-2007, 11:16 PM#9
Vexorian
SetUnitLookAt == the devil.

It is instant but blizz resets it to the original position some time, so for loops it is pretty terrible.
04-03-2007, 12:13 AM#10
Vexorian
It doesn't.

Have you ever actually used it?

And when I mean loop I mean a timer loop
04-03-2007, 07:31 AM#11
Anitarf
The problem is that the unit reverts to default facing whenever you give it a new position to face to, and then it turns to face that position afterwards, so you can't get a smooth transition between facing unit A and facing unit B (unless you make it face unit C and move that unit from A to B, but even then the facing doesn't follow C smoothly, but updates choppily), you can only get a smooth transition between facing nothing and facing a unit. Of course, with a blend time of 0, this probably isn't noticeable, since it reaches the new facing before the player would see that it got reset in the meantime.
04-03-2007, 08:19 AM#12
blu_da_noob
Quote:
Originally Posted by Litany
Sounds like blend time isn't set to 0.

Aah, yeah. Forgot I was testing on a blank map again :/
02-05-2008, 05:09 PM#13
grupoapunte
Is not working for me, what are you using to fire the shockwave in diferent directions?

Thanks
02-05-2008, 07:12 PM#14
TaintedReality
02-06-2008, 02:36 AM#15
Pyrogasm
That is too priceless, TaintedReality.