• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Wrong triggers starting off >.>

Status
Not open for further replies.
Level 3
Joined
Aug 16, 2007
Messages
30
Ok, I have searched the forum without success, tried on the chat an asked some persons and no1 seems to have the answer to the following question... (but I feel the anwser is so simple...)

The case is the following: I got a unit that has 2 abilities based on the same base one (channel).
How I make the right trigger start off when a unit uses an ability? I noticed that the spell works perfectly until the hero learns the other one (and vice-versa)
I thought that maybe changing the order string in object editor would do the trick, but no...

They are both made from the channel spell and one does like a fire wall and an other makes a dummy that casts shokwave and flame strike behind the missle... Not rly complicated, but has a nice visual effect ^^

Ty for help...
 
Level 7
Joined
Oct 14, 2008
Messages
340
your problem can be solved by

JASS:
function Your_Trigger_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A000'//instead of A000 use the raw code of your ability.
endfunction
or
  • Conditions
    • (Ability being cast equal to Your Ability)
 
Level 3
Joined
Aug 16, 2007
Messages
30
your problem can be solved by

JASS:
function Your_Trigger_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A000'//instead of A000 use the raw code of your ability.
endfunction
or
  • Conditions
    • (Ability being cast equal to Your Ability)

Ummm... I know to make the ability being cast -.-'

There are teh triggers:
  • Bird Creation
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fire Bird
    • Actions
      • Set CasterPos = (Position of (Casting unit))
      • Set CasterTarget = (Target point of ability being cast)
      • Unit - Create 1 Dummy Caster - Wave/Flamestrike for (Owner of (Casting unit)) at CasterPos facing CasterTarget
      • Set FireBirdStrikeDummy = (Last created unit)
      • Unit - Order FireBirdStrikeDummy to Orc Tauren Chieftain - Shockwave (Target point of ability being cast)
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • Wait 0.05 seconds
          • Set FireStrikeDistance = (FireStrikeDistance + 200.00)
          • Unit - Order FireBirdStrikeDummy to Human Blood Mage - Flame Strike (CasterPos offset by FireStrikeDistance towards (Angle from CasterPos to CasterTarget) degrees)
      • Set FireStrikeDistance = 0.00
      • Unit - Remove FireBirdStrikeDummy from the game
      • Custom script: set udg_FireBirdStrikeDummy = null
      • Custom script: set udg_CasterPos = null
      • Custom script: set udg_CasterTarget = null
and

  • FireWal
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fire Wall
    • Actions
      • Set CasterPos = (Position of (Casting unit))
      • Set CasterTarget = (Target point of ability being cast)
      • Unit - Create 1 FireWallFire for (Owner of (Casting unit)) at CasterPos facing CasterTarget
      • Set FireBirdStrikeDummy = (Last created unit)
      • Unit - Order FireBirdStrikeDummy to Human Blood Mage - Flame Strike (CasterTarget offset by 0.00 towards ((Angle from CasterPos to CasterTarget) - 90.00) degrees)
      • Wait 0.01 seconds
      • Unit - Order FireBirdStrikeDummy to Human Blood Mage - Flame Strike (CasterTarget offset by 100.00 towards ((Angle from CasterPos to CasterTarget) - 90.00) degrees)
      • Wait 0.01 seconds
      • Unit - Order FireBirdStrikeDummy to Human Blood Mage - Flame Strike (CasterTarget offset by 100.00 towards ((Angle from CasterPos to CasterTarget) + 90.00) degrees)
      • Wait 0.01 seconds
      • Unit - Order FireBirdStrikeDummy to Human Blood Mage - Flame Strike (CasterTarget offset by 200.00 towards ((Angle from CasterPos to CasterTarget) - 90.00) degrees)
      • Wait 0.01 seconds
      • Unit - Order FireBirdStrikeDummy to Human Blood Mage - Flame Strike (CasterTarget offset by 200.00 towards ((Angle from CasterPos to CasterTarget) + 90.00) degrees)
      • Wait 0.01 seconds
      • Unit - Order FireBirdStrikeDummy to Human Blood Mage - Flame Strike (CasterTarget offset by 300.00 towards ((Angle from CasterPos to CasterTarget) - 90.00) degrees)
      • Wait 0.01 seconds
      • Unit - Order FireBirdStrikeDummy to Human Blood Mage - Flame Strike (CasterTarget offset by 300.00 towards ((Angle from CasterPos to CasterTarget) + 90.00) degrees)
The second starts off when I cast the ability of the first one... that's my problem... TT
and I need to have them both made from the channel spell...

Forgot to say that it's not a multiplayer map, so I can use waits and variables without arrey
 
Last edited:
Level 7
Joined
Oct 14, 2008
Messages
340
For the first one, you're removing the dummies before they finish casting, try using this instead of remove:
  • Actions
    • Unit - Add a 5.00 second Generic Expiration Timer to (your unit)
for the second trigger, what exactly goes wrong? other than like 2000 leaks :p
 
Level 3
Joined
Aug 16, 2007
Messages
30
pffff...
well, there are leaks :p (will remove them leater on...)
but that's not the point... there is nothing wrong with the trigger, it's just that one trigger starts when i cast not the ability being cast, but teh other one !!!
 
Status
Not open for further replies.
Top