• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Ability equal to "XY" problem

Status
Not open for further replies.
Level 7
Joined
Feb 9, 2007
Messages
56
Hi all,

I've got a problem with a spell. Actually the spell works perfect. But what doesn't work well is that the trigger gets also fired when the hero uses a certain other spell. Both spells were originally made of warstomp.
First I thought it's because I made them out of the same warstomp, so that they have the same id. But then I used a different warstomps. But it still didn't work. PS: I think I have to mention that the Fiery Explosion Ability is in a spellbook. Maybe that's the problem...

  • FieryExplosion Kopieren
    • Ereignisse
      • Einheit - A unit Startet den Effekt einer Fähigkeit
    • Bedingungen
      • (Ability being cast) Gleich Fiery Explosion
    • Aktionen
      • Set tempPoint[0] = (Position of (Triggering unit))
      • Spezialeffekt - Create a special effect at tempPoint[0] using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
      • Spezialeffekt - Destroy (Last created special effect)
      • Set gruppe = (Units within 225.00 of tempPoint[0] matching (((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Gleich False))
      • Einheitengruppe - Pick every unit in gruppe and do (Einheit - Cause (Triggering unit) to damage (Picked unit), dealing (40.00 x (1.00 + (Spelldamage[(Player number of (Owner of (Triggering unit)))] - ((Real((Custom value of (Picked unit)))) / 100.00)))) damage of attack type Zaubersprüche and damage type Feu
      • Custom script: call DestroyGroup(udg_gruppe)
      • Custom script: call RemoveLocation(udg_tempPoint[0])
      • Animation - Change (Triggering unit) flying height to 400.00 at 1500.00
      • Wait 0.01 seconds
      • Einheit - Make (Triggering unit) Unverwundbar
      • Wait 0.19 seconds
      • Animation - Change (Triggering unit) flying height to 0.00 at 800.00
      • Wait 1.05 seconds
      • Einheit - Make (Triggering unit) Verwundbar
Then I thought I could use this as condition:

  • Bedingungen
    • (Name of (Ability being cast)) Gleich (Name of Fiery Explosion )
(Anyone knows why this isn't working...? The name of the other ability is "Concentration")



What I also don't understand is:
When I make two triggers like the one up there. But with different conditions:

  • Bedingungen
    • (Ability being cast) Gleich Fiery Explosion
  • Bedingungen
    • (Ability being cast) Gleich Concentrations
And then transform them to jass...
then I get:

JASS:
function Trig_FieryExplosion_Kopieren_Kopieren_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A001' ) ) then
        return false
    endif
    return true
endfunction

and

JASS:
function Trig_FieryExplosion_Kopieren_Kopieren_Kopieren_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A00B' ) ) then
        return false
    endif
    return true
endfunction

So A001 and A00B. They are different, but why then is the damn trigger running at both spells....


Your help would be very appreciated!
Thanks in advance,
BOESERTEDDY
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
It's because wc3 considers both spells the same, since they were both based on the same ability. You must use 2 abilities with different order strings. War stomp (orc) and War stomp (neutral hostile) for instance might be 2 different abilities, but they both have the same order string (war stomp).

Try basing one of the 2 spells on another ability. For instance "Bash" or "Channel" (the zlmost perfect dummy ability)
 
Level 7
Joined
Feb 9, 2007
Messages
56
Hm but it's still strange...

I mean I thought, or I was sure it worked before. When you have two different units with two different warstomps then you can make a trigger that only fires at one of the two warstomps... So the problem is because the units has both abilities...

sorry i dont speak german :p

Well, I don't think it's hard to understand even without a word german.

PS: Thx for fast reply

PPS: Do you happen to know a site or something where it's explained how to use the "channel" ability. I can find it out by myself, but it would go faster...
What's the following doing:

-Tracking through the time
-deactivate other abilities
-option (general spell, unic casting, ect)

THX
 
Status
Not open for further replies.
Top