HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Casting Unit =\= Triggering Unit !?

08-27-2003, 10:41 AM#1
danny760311
I've made a trigger like that:

Code:
Magic Shield Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to XXX
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A sapper) Equal to False) and (((Matching unit) is and do (Actions)
            Loop - Actions
                Unit - Create 1 AMS for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                Unit - Order (Last created unit) to Undead Banshee - Anti-magic Shell (Picked unit)

And the trigger works well.

But when I write like this:
Code:
Magic Shield Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to XXX
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Owner of (Matching unit)) is an ally of (Owner of (Casting Unit))) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A sapper) Equal to False) and (((Matching unit) is and do (Actions)
            Loop - Actions
                Unit - Create 1 AMS for (Owner of (Casting Unit)) at (Position of (Casting Unit)) facing Default building facing degrees
                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                Unit - Order (Last created unit) to Undead Banshee - Anti-magic Shell (Picked unit)

It just doesn't work (No unit is put on AMS)

And I also made a similar skill, which is written in JASS, casting Cripple to Enemies. And only 1 unit got cursed after I replaced "GetTriggerUnit()" by "SpellAbilityUnit()" .

Anyone know why? I thought when using "A unit cast ability" event, Casting Unit and Triggering Unit refers to the same unit. Then why only one of the two triggers work? Are there any difference between them? Anyone can tell them apart?
08-27-2003, 11:03 AM#2
EarthxFury
i dotn think casting unit refers to a unti that beggins an efect of an ability. and all those 'is saper is false' write that into the ability, like make it not ablue top target sappers, buldings, onyl allied, ext.
08-27-2003, 11:06 AM#3
danny760311
I just tested again, replacing the 2nd trigger's "Casting Unit" by "Triggering Unit", it woks again (Also the Cripple trigger does). According to this, I think I didn't make any mistake replacing, or it's won't work well replacing back.

P.S: I just found a little problem, look at the pre-string, some words missed when I copy my trigger as text.
08-27-2003, 11:11 AM#4
danny760311
Quote:
i dotn think casting unit refers to a unti that beggins an efect of an ability


Well, I think it is.

Test the trigger:

Code:
Test
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Carrion Swarm
    Actions
        Cinematic - Ping minimap for (All players) at (Position of (Casting unit)) for 1.00 seconds, using a Simple ping of color (0.00%, 0.00%, 100.00%)

It does work...
08-27-2003, 12:35 PM#5
EarthxFury
its that massive condition you have... remove it, jsyut make it ']is an ally of casting player' cause antimagic shell cant hit buldings.
08-29-2003, 11:23 AM#6
danny760311
Why's that???

It works perfect when I use Triggering Unit, why bugs when Casting Unit???
08-31-2003, 05:54 AM#7
FF_Behemoth
I've posted another solution to this on the bnet war3 forum.. go search it

- ByTe.ME uswest