HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Non Multi-Instancability

09-27-2006, 04:34 AM#1
WTFish
I made a no-target silence ability, that kills the caster. The problem is, is that it is multi-instanceable. I need to make it so if, the casting player has more than one unit selected and they use the ability, it doesnt destroy them all through silence; only one of them will actually cast the ability (preferably the one on the least health).

Here is the trigger I am using


Trigger:
Silence
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Instant Silence
Collapse Actions
Set SilenceCaster = (Triggering unit)
Set SilencePosition = (Position of SilenceCaster)
Unit - Create 1 DUMMY CASTER OF SILENCE for (Owner of SilenceCaster) at SilencePosition facing 0.00 degrees
Unit - Order (Last created unit) to Neutral Dark Ranger - Silence SilencePosition
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Kill SilenceCaster
Custom script: call RemoveLocation(udg_SilencePosition)

What do I need to change to make it so only one person can use it at a time?

Do I create a separate trigger that detects when I issue the silence order and stops every unit except for one?

Any ideas would be appreciated.

Ps. In [trigger] tags would be nice if you have something like the code for that separate trigger (If thats how you do it, lol)
09-27-2006, 04:47 AM#2
Nubcookie
What do you mean only one person use it at a time? It's instant. If you want to put a time limit, ie it can only be used once every 10 seconds then do this:

Trigger:
Silence
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Instant Silence
SilenceCastingBoolean Equal to False
Collapse Actions
Set SilenceCastingBoolean = True
Set SilencePosition = (Position of SilenceCaster)
Unit - Create 1 DUMMY CASTER OF SILENCE for (Owner of SilenceCaster) at SilencePosition facing 0.00 degrees
Unit - Order (Last created unit) to Neutral Dark Ranger - Silence SilencePosition
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Kill SilenceCaster
Custom script: call RemoveLocation(udg_SilencePosition)
Wait 10 seconds
Set SilenceCastingBoolean = False
ps, you don't need to Set SilenceCaster = (Triggering unit), its just one extra var
09-30-2006, 05:16 AM#3
WTFish
Well, you have multiple units that have this ability. If, in the middle of a battle, I accidently double click then press the ability, it will destroy 1 selection of my army. I want to make it so that only 1 unit per player can cast this ability at any one time.

Thanks
09-30-2006, 06:56 AM#4
zeroXD
Hmm, then you will need to change the ability it is based on, some abilities will only be cast once, but only thing i can come up with right now is channeling abilities, i dont really know if anything else works.
10-02-2006, 07:31 PM#5
WTFish
Hmm, Howl of Terror will only be cast once, but I'm using it for another ability. Perhaps I have to base it off of an ability that would be pointless to cast more than once at the same time. Does anyone know any non targeted abilities that will only cast once?
10-03-2006, 08:00 AM#6
zeroXD
Roar? Havent tested, but if howl cast once this also should cast once since its the oposite... Almost.
10-03-2006, 09:42 AM#7
martix
Well, you've achieved it - only one unit can cast it at any one time. But all this does happen very fast, so you need to explain what you mean exactly.
10-03-2006, 10:25 AM#8
zeroXD
U could use nubcookies excample, only with a 0.1 sec wait instead, but the problem then will be only one unit of one player could cast it at a time. I think roar should work.
10-05-2006, 06:03 AM#9
WTFish
Yeah, thanks. Roar worked perfectly.
Non Multi-Instancability - Wc3C.net