I was reading about simple dummy units (using triggers, not jass) and came up with an idea. I've never used dummys before, and a usefull thing would be to stun a unit with a dummy.
So, the idea is like this; to use a trigger (event: unit casts a spell), to create dummy who attacks (once) targeted unit with spell. The dummy has a 100% bash for 2 seconds.
Would this work?, if please give tips of how to create and use the dummy. Does this not work?, then are there other simple ways of stunning with dummys?
PS. anyone interested in making an "Eragon"/"Eldest" map?? pm me!
1st if you want to use a dummy, you should know that it (most often) courses some increase of the 'lagability' of your map. Therefore you should only use them, if the other ways would slow your map even more, or if they are way more complicated.
2nd Dummy units need to be invisible to the player/s It also needs to act without taking any time t all. Therefore you should do the following stuff whenever using a dummy:
dummy - colision range = 0
dummy - movementtype = flying
dummy - abilities - permanent invisibility (modified to take 0.01 seconds to recloak)
dummy - abilities - invincibility
dummy - abilities - locust (the one that the swarm units have and that courses them to be unselectable)
dummy - abilities - <some passiv to be able to see invisible units>
dummy - model - use a custom model that does not exist - that way it has none and can not create any model-bound sounds
dummy - does not decay and can't be resurected
dummy - sightrange = max
dummy - scaling = min
trigger - add an expiration timer with about 0.1 or maybe 0.2 to the dummy - that gets rid of it without having to care about it anymore
trigger - add all the abilities the dummy shall have when it needs to have them - reduces lag (e.g. if a dummy with about 50 abilities would be placed - that takes longer than one with no abilities and adding one ability via trigger to it)
trigger - give only one order to the dummy (it is not meant to exist long enough to do more than one order, even though you may do here as you see fit)
3ed If you finnaly want to use a dummy, you shall do it like this:
<some trigger code here>
unit - create a dummy for <whatever you like - if it might kill then you shall use the player the kill shall be counted to> using <default facing angel> unit - add expiration timer (0.2) seconds to (last created unit) unit - add ability <add whatever abilities you want it to have> unit - order <to use that ability - i would recommend using spells instead of passives>
<some more trigger code here>
i hope you understood how dummies are used. If you still have questions - feel fre to ask em.
PS: you might want to use a modified 'Firebolt (neutral enemy)' instead of a 100% bash attacking another unit triggers a whole bunch of events, while casting on it only triggers a few ones. Therefore casting is (most often) faster than attacking.
dummy - abilities - permanent invisibility (modified to take 0.01 seconds to recloak)
dummy - abilities - invincibility
dummy - abilities - locust (the one that the swarm units have and that courses them to be unselectable)
dummy - abilities - <some passiv to be able to see invisible units>
dummy - model - use a custom model that does not exist - that way it has none and can not create any model-bound sounds
dummy - does not decay and can't be resurected
dummy - sightrange = max
dummy - scaling = min
trigger - add an expiration timer with about 0.1 or maybe 0.2 to the dummy - that gets rid of it without having to care about it anymore
trigger - add all the abilities the dummy shall have when it needs to have them - reduces lag (e.g. if a dummy with about 50 abilities would be placed - that takes longer than one with no abilities and adding one ability via trigger to it)
trigger - give only one order to the dummy (it is not meant to exist long enough to do more than one order, even though you may do here as you see fit)
Hmmm... well ... see invisible units is not right. It shall see no units the caster can't see. In most cases. And locust sets units invulnerable afaik And units without collosion doesnt need to be flying Just to simplify it a bit.
Your explanation was quite good. Maybe you should post a dummy tutorial
Thanks alot! That did really help, gonna test it any minute now. But 1 little thing, see, i have had some problems ordering units to cast spells. Correct me if im wrong, but isnt it so you can only order units to cast the original spells (say, storm bolt, sleep)?
Cause you said: "PS: you might want to use a modified 'Firebolt (neutral enemy)' instead of a 100% bash"
So, can i simply create a custom spell and use it, or do i have to modify the original spell in objekt editor?? (this would cause problems if you would like to have different stun times, 1 sec/2sec etc)
In every spell you got that "activation string" It doesnt matter if its the original ability or a custom one. The game refers to that string so make sure your dummy has the ability just once