IsUnitSilenced/UNIT_TYPE_SILENCED?

Weep

Godspeed to the sound of the pounding
Reaction score
400
Is there a foolproof, friendly way (ie. not buff detection nor seeing if an issue order call returns true, since that would interfere with the unit's orders) to find out if a unit is silenced? I'm trying to make a custom autocast-on-attack spell for which a unit needs to have a certain hidden ability at the time it launches its attack, but only if the autocast spell is enabled.
 

saw792

Is known to say things. That is all.
Reaction score
280
Only way I can really think of is to make a list of all your silencing abilities and their durations and attach that to the unit. It's either that or triggering all your silences.

Unless... you gave the unit a temporary skill based on something instant like wind walk with a 0.01 duration or something, and check if that fires. Of course that would interfere with regular invisibility, and might result in a few missiles being dodged from the wind walk.

EDIT: I have a feeling just detecting the buff won't be all that's necessary... I just can't remember why.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
You guys realize that you've both suggested methods that I mentioned in the original post as methods I know about and am hoping to avoid? :rolleyes:

Only way I can really think of is to make a list of all your silencing abilities and their durations and attach that to the unit. It's either that or triggering all your silences.
Bleh.

So I tried Spell Shield to see if it would activate while silenced; it does. :(
 

Grundy

Ultra Cool Member
Reaction score
35
Well I know right clicking an auto cast ability does not interupt orders so I thought I was onto something, adding an auto cast ability to a unit and checking if activating the auto cast works, if it fails you're silenced if it works you're not silenced and then removing the auto cast ability. It worked as far as checking if the unit is silenced and you never see the ability on the unit but its still useless to you because i just found out issuing the order automatically makes the unit stop doing whatever it was doing. that's really lame that issuing the order by right clicking on the ability does not interupt orders but issuing the order through triggers does interupt orders.

So I don't think this is possible unless you trigger all of your silences. If you use J4L's Status system to for all of your silence spells then you can check if the unit is silenced by doing Status[whichUnit].isSilenced()
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
but its still useless to you because i just found out issuing the order automatically makes the unit stop doing whatever it was doing. that's really lame that issuing the order by right clicking on the ability does not interupt orders but issuing the order through triggers does interupt orders.
It is, indeed, super-lame. :(

(Berserk is okay for it.)
No, Berserk is still possible to cast when a unit is silenced. Windwalk works, but has other problems.
Duly tried, not a good solution: if the unit is not silenced (capable of following the order), it will have whatever it is currently doing (moving, casting, etc.) interrupted. Issuing a unit an order from a trigger always does, even if the same order issued by a mouse click would not (see above).
 

Executor

I see you
Reaction score
57
What about:
Add a dummy ability.
Issue the unit to cast it.
set result = false
On <unit begins casting> remove the ability and set result = true
Wait a little bit and go on..

Dunno if removing the ability recovers the old order nor whether the delay matches your requirements.
 

Grundy

Ultra Cool Member
Reaction score
35
What about:
Add a dummy ability.
Issue the unit to cast it.
set result = false
On <unit begins casting> remove the ability and set result = true
Wait a little bit and go on..

Dunno if removing the ability recovers the old order nor whether the delay matches your requirements.

Executor, several people have already suggested that in this very thread, tested, and confirmed that it does not work.
 

SanKakU

Member
Reaction score
21
Is there a foolproof, friendly way (ie. not buff detection nor seeing if an issue order call returns true, since that would interfere with the unit's orders) to find out if a unit is silenced? I'm trying to make a custom autocast-on-attack spell for which a unit needs to have a certain hidden ability at the time it launches its attack, but only if the autocast spell is enabled.

what do you mean that you are trying to do? have a unit silenced but still able to use the autocast-on-attack spell? or what, exactly? i don't understand those kind of spells to begin with. about detecting silence...hmm...yeah i don't know how that could work but if you could detect that it would be nice to extend that detection to things like unit blindness, unit confusion, unit berserk, and other status effects...but that is basically buffs. can't you make a general buff for all units that are silenced that basically just says, hey, this unit is silenced, and leave it at that? but then it sounds like what you really need is a CUSTOM SILENCE SPELL...where you trigger the spell to disable whatever spells should be disabled, depending on whatever unit it is casted on. this way, you could disable all spells as if it were real silence, or disable all but that black arrow or frost arrow ability or whatever...if that was your intent, of course...i don't really understand what you were after by your short explanation.

even if you do that...hey, how do you temporarily disable a spell for a unit, in other words, manually silence a unit, anyway?

as far as i know, you can't trip the cooldown for a spell like that, so considering the similiarity, it might not be possible. i haven't tried it, but it would be nice if it could be done.
 

Akolyt0r

New Member
Reaction score
33
Grundy's way might work if you order the last order again... (maybe using some library like LastOrder)

btw Grundy, did you try issue that autocast-trigger order with an immediate order or not ? If not you could try if an immediate order interrupts the current order aswell or not ..

And i still wanted to mention that the use of a dummy ability is kinda lame, since it will not work as intended if the ordered unit already has a ability which uses the same orderid...
 

Jesus4Lyf

Good Idea™
Reaction score
397
Grundy's way might work if you order the last order again... (maybe using some library like LastOrder)
Imagine Starfall gets interrupted. It will not continue by reordering.
On the other hand, if the unit has casted a spell and the spell has not finished, then obviously the unit is not silenced. I'm pretty sure in almost all other cases you will get away with reordering, except for things like queued orders with shift click. Which, of course, means this can't be done without using some other solution, which is the point of this thread. :)
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Which, of course, means this can't be done without using some other solution, which is the point of this thread. :)
Bingo.

So far, it looks like the only way is to have prior knowledge every buff used for silencing in a map. :( (Fine if it's only your own map.)
 
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