• 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.

[Trigger] pls i need a bit help

Status
Not open for further replies.
Level 8
Joined
Jul 23, 2005
Messages
329
This post is just for people who don't want to DL the .txt.
I can't find anything...

  • BladeStrike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Bladestrike
    • Actions
      • Set caster = (Casting unit)
      • Set VictiM = (Target unit of ability being cast)
      • Set Victim_Position = (Position of (Target unit of ability being cast))
      • Selection - Remove caster from selection for (Owner of caster)
      • Selection - Remove VictiM from selection for (Owner of VictiM)
      • Camera - Pan camera for (Owner of caster) to Victim_Position with height -300.00 above the terrain over 8.00 seconds
      • Unit - Move caster instantly to Victim_Position
      • Unit - Pause VictiM
      • Wait 0.50 seconds
      • Special Effect - Create a special effect attached to the weapon of caster using Abilities\Spells\Undead\OrbOfDeath\OrbOfDeathMissile.mdl
      • Set spceff[1] = (Last created special effect)
      • Unit - Create 1 Shadow Blademaster for (Owner of caster) at (Victim_Position offset by 90.00 towards 90.00 degrees) facing Victim_Position
      • Set unitShad[1] = (Last created unit)
      • Unit - Create 1 Shadow Blademaster for (Owner of caster) at (Victim_Position offset by 90.00 towards 180.00 degrees) facing Victim_Position
      • Set unitShad[2] = (Last created unit)
      • Unit - Create 1 Shadow Blademaster for (Owner of caster) at (Victim_Position offset by 90.00 towards 270.00 degrees) facing Victim_Position
      • Set unitShad[3] = (Last created unit)
      • Unit - Create 1 Shadow Blademaster for (Owner of caster) at (Victim_Position offset by 90.00 towards 360.00 degrees) facing Victim_Position
      • Set unitShad[4] = (Last created unit)
      • Animation - Change unitShad[1]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 20.00% transparency
      • Animation - Change unitShad[2]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 20.00% transparency
      • Animation - Change unitShad[3]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 20.00% transparency
      • Animation - Change unitShad[4]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 20.00% transparency
      • Unit - Order caster to Attack VictiM
      • Unit - Order unitShad[1] to Attack VictiM
      • Unit - Order unitShad[2] to Attack VictiM
      • Unit - Order unitShad[3] to Attack VictiM
      • Unit - Order unitShad[4] to Attack VictiM
      • Wait 5.00 seconds
      • Camera - Shake the camera for (Owner of caster) with magnitude 6.00
      • Wait 1.00 seconds
      • Camera - Stop swaying/shaking the camera for (Owner of caster)
      • Unit - Create 1 Blade for (Owner of caster) at (Victim_Position offset by 180.00 towards 45.00 degrees) facing Victim_Position
      • Set blade[1] = (Last created unit)
      • Unit - Create 1 Blade for (Owner of caster) at (Victim_Position offset by 180.00 towards 90.00 degrees) facing Victim_Position
      • Set blade[2] = (Last created unit)
      • Unit - Create 1 Blade for (Owner of caster) at (Victim_Position offset by 180.00 towards 135.00 degrees) facing Victim_Position
      • Set blade[3] = (Last created unit)
      • Unit - Create 1 Blade for (Owner of caster) at (Victim_Position offset by 180.00 towards 180.00 degrees) facing Victim_Position
      • Set blade[4] = (Last created unit)
      • Unit - Create 1 Blade for (Owner of caster) at (Victim_Position offset by 180.00 towards 225.00 degrees) facing Victim_Position
      • Set blade[5] = (Last created unit)
      • Unit - Create 1 Blade for (Owner of caster) at (Victim_Position offset by 180.00 towards 270.00 degrees) facing Victim_Position
      • Set blade[6] = (Last created unit)
      • Unit - Create 1 Blade for (Owner of caster) at (Victim_Position offset by 180.00 towards 315.00 degrees) facing Victim_Position
      • Set blade[7] = (Last created unit)
      • Unit - Create 1 Blade for (Owner of caster) at (Victim_Position offset by 180.00 towards 360.00 degrees) facing Victim_Position
      • Set blade[8] = (Last created unit)
      • Wait 1.00 seconds
      • Unit - Create 1 Shadow Blademaster for (Owner of caster) at (Victim_Position offset by 90.00 towards 45.00 degrees) facing Victim_Position
      • Set unitShad[5] = (Last created unit)
      • Unit - Create 1 Shadow Blademaster for (Owner of caster) at (Victim_Position offset by 90.00 towards 135.00 degrees) facing Victim_Position
      • Set unitShad[6] = (Last created unit)
      • Unit - Create 1 Shadow Blademaster for (Owner of caster) at (Victim_Position offset by 90.00 towards 225.00 degrees) facing Victim_Position
      • Set unitShad[7] = (Last created unit)
      • Unit - Create 1 Shadow Blademaster for (Owner of caster) at (Victim_Position offset by 90.00 towards 315.00 degrees) facing Victim_Position
      • Set unitShad[8] = (Last created unit)
      • Animation - Change unitShad[5]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 20.00% transparency
      • Animation - Change unitShad[6]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 20.00% transparency
      • Animation - Change unitShad[7]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 20.00% transparency
      • Animation - Change unitShad[8]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 20.00% transparency
      • Unit - Order unitShad[5] to Attack VictiM
      • Unit - Order unitShad[6] to Attack VictiM
      • Unit - Order unitShad[7] to Attack VictiM
      • Unit - Order unitShad[8] to Attack VictiM
      • Special Effect - Create a special effect at Victim_Position using Units\Undead\Abomination\AbominationExplosion.mdl
      • Set spceff[2] = (Last created special effect)
      • Trigger - Turn on BladesMOVE <gen>
      • Wait 2.00 seconds
      • Animation - Play unitShad[1]'s Attack Walk Stand Spin animation
      • Animation - Play unitShad[2]'s Attack Walk Stand Spin animation
      • Animation - Play unitShad[3]'s Attack Walk Stand Spin animation
      • Animation - Play unitShad[4]'s Attack Walk Stand Spin animation
      • Animation - Play unitShad[5]'s Attack Slam animation
      • Animation - Play unitShad[6]'s Attack Slam animation
      • Animation - Play unitShad[7]'s Attack Slam animation
      • Animation - Play unitShad[8]'s Attack Slam animation
      • Wait 1.00 seconds
      • Trigger - Turn off BladesMOVE <gen>
      • Unit - Order unitShad[1] to Orc Tauren Chieftain - War Stomp
      • Unit - Order unitShad[2] to Orc Tauren Chieftain - War Stomp
      • Unit - Order unitShad[3] to Orc Tauren Chieftain - War Stomp
      • Unit - Order unitShad[4] to Orc Tauren Chieftain - War Stomp
      • Unit - Order unitShad[5] to Orc Tauren Chieftain - War Stomp
      • Unit - Order unitShad[6] to Orc Tauren Chieftain - War Stomp
      • Unit - Order unitShad[7] to Orc Tauren Chieftain - War Stomp
      • Unit - Order unitShad[8] to Orc Tauren Chieftain - War Stomp
      • Unit - Add a 2.00 second Generic expiration timer to unitShad[1]
      • Unit - Add a 2.00 second Generic expiration timer to unitShad[2]
      • Unit - Add a 2.00 second Generic expiration timer to unitShad[3]
      • Unit - Add a 2.00 second Generic expiration timer to unitShad[4]
      • Unit - Add a 2.00 second Generic expiration timer to unitShad[5]
      • Unit - Add a 2.00 second Generic expiration timer to unitShad[6]
      • Unit - Add a 2.00 second Generic expiration timer to unitShad[7]
      • Unit - Add a 2.00 second Generic expiration timer to unitShad[8]
      • Unit - Add a 2.00 second Generic expiration timer to blade[1]
      • Unit - Add a 2.00 second Generic expiration timer to blade[2]
      • Unit - Add a 2.00 second Generic expiration timer to blade[3]
      • Unit - Add a 2.00 second Generic expiration timer to blade[4]
      • Unit - Add a 2.00 second Generic expiration timer to blade[5]
      • Unit - Add a 2.00 second Generic expiration timer to blade[6]
      • Unit - Add a 2.00 second Generic expiration timer to blade[7]
      • Unit - Add a 2.00 second Generic expiration timer to blade[8]
      • Unit - Order caster to Attack VictiM
      • Wait 1.00 seconds
      • Special Effect - Destroy spceff[1]
      • Special Effect - Destroy spceff[2]
      • Selection - Add caster to selection for (Owner of caster)
      • Selection - Add VictiM to selection for (Owner of VictiM)
      • Animation - Change caster's animation speed to 100.00% of its original speed
      • Camera - Reset camera for (Owner of caster) to standard game-view over 0.00 seconds
      • Custom script: set udg_unitShad[1] = null
      • Custom script: set udg_unitShad[2] = null
      • Custom script: set udg_unitShad[3] = null
      • Custom script: set udg_unitShad[4] = null
      • Custom script: set udg_unitShad[5] = null
      • Custom script: set udg_unitShad[6] = null
      • Custom script: set udg_unitShad[7] = null
      • Custom script: set udg_unitShad[8] = null
      • Custom script: set udg_blade[1] = null
      • Custom script: set udg_blade[2] = null
      • Custom script: set udg_blade[3] = null
      • Custom script: set udg_blade[4] = null
      • Custom script: set udg_blade[5] = null
      • Custom script: set udg_blade[6] = null
      • Custom script: set udg_blade[7] = null
      • Custom script: set udg_blade[8] = null
      • Custom script: set udg_spceff[1] = null
      • Custom script: set udg_caster = null
      • Custom script: set udg_VictiM = null
      • Custom script: call RemoveLocation (udg_Victim_Position)
 
Level 6
Joined
Feb 2, 2005
Messages
205
ow, thats a bunch of Trigger. You can Shorten the Trigger with a loop
  • BladeStrike
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Bladestrike
  • Actions
    • Costum Script: local location udg_Victim_Position
    • Set caster = (Casting unit)
    • Set VictiM = (Target unit of ability being cast)
    • Set Victim_Position = (Position of (Target unit of ability being cast))
    • Selection - Remove caster from selection for (Owner of caster)
    • Selection - Remove VictiM from selection for (Owner of VictiM)
    • Camera - Pan camera for (Owner of caster) to Victim_Position with height -300.00 above the terrain over 8.00 seconds
    • Unit - Move caster instantly to Victim_Position
    • Unit - Pause VictiM
    • Wait 0.50 seconds
    • Special Effect - Create a special effect attached to the weapon of caster using Abilities\Spells\Undead\OrbOfDeath\OrbOfDeathMissile.mdl
    • Set spceff[1] = (Last created special effect)
    • Unit - Create 1 Shadow Blademaster for (Owner of caster) at (Victim_Position offset by 90.00 towards 90.00 degrees) facing Victim_Position
    • Set unitShad[1] = (Last created unit)
    • Unit - Create 1 Shadow Blademaster for (Owner of caster) at (Victim_Position offset by 90.00 towards 180.00 degrees) facing Victim_Position
    • Set unitShad[2] = (Last created unit)
    • Unit - Create 1 Shadow Blademaster for (Owner of caster) at (Victim_Position offset by 90.00 towards 270.00 degrees) facing Victim_Position
    • Set unitShad[3] = (Last created unit)
    • Unit - Create 1 Shadow Blademaster for (Owner of caster) at (Victim_Position offset by 90.00 towards 360.00 degrees) facing Victim_Position
    • Set unitShad[4] = (Last created unit)
    • Animation - Change unitShad[1]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 20.00% transparency
    • Animation - Change unitShad[2]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 20.00% transparency
    • Animation - Change unitShad[3]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 20.00% transparency
    • Animation - Change unitShad[4]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 20.00% transparency
    • Unit - Order caster to Attack VictiM
    • Unit - Order unitShad[1] to Attack VictiM
    • Unit - Order unitShad[2] to Attack VictiM
    • Unit - Order unitShad[3] to Attack VictiM
    • Unit - Order unitShad[4] to Attack VictiM
    • Wait 5.00 seconds
    • Camera - Shake the camera for (Owner of caster) with magnitude 6.00
    • Wait 1.00 seconds
    • Camera - Stop swaying/shaking the camera for (Owner of caster)
    • Unit - Create 1 Blade for (Owner of caster) at (Victim_Position offset by 180.00 towards 45.00 degrees) facing Victim_Position
    • Set blade[1] = (Last created unit)
    • Unit - Create 1 Blade for (Owner of caster) at (Victim_Position offset by 180.00 towards 90.00 degrees) facing Victim_Position
    • Set blade[2] = (Last created unit)
    • Unit - Create 1 Blade for (Owner of caster) at (Victim_Position offset by 180.00 towards 135.00 degrees) facing Victim_Position
    • Set blade[3] = (Last created unit)
    • Unit - Create 1 Blade for (Owner of caster) at (Victim_Position offset by 180.00 towards 180.00 degrees) facing Victim_Position
    • Set blade[4] = (Last created unit)
    • Unit - Create 1 Blade for (Owner of caster) at (Victim_Position offset by 180.00 towards 225.00 degrees) facing Victim_Position
    • Set blade[5] = (Last created unit)
    • Unit - Create 1 Blade for (Owner of caster) at (Victim_Position offset by 180.00 towards 270.00 degrees) facing Victim_Position
    • Set blade[6] = (Last created unit)
    • Unit - Create 1 Blade for (Owner of caster) at (Victim_Position offset by 180.00 towards 315.00 degrees) facing Victim_Position
    • Set blade[7] = (Last created unit)
    • Unit - Create 1 Blade for (Owner of caster) at (Victim_Position offset by 180.00 towards 360.00 degrees) facing Victim_Position
    • Set blade[8] = (Last created unit)
    • Wait 1.00 seconds
    • Unit - Create 1 Shadow Blademaster for (Owner of caster) at (Victim_Position offset by 90.00 towards 45.00 degrees) facing Victim_Position
    • Set unitShad[5] = (Last created unit)
    • Unit - Create 1 Shadow Blademaster for (Owner of caster) at (Victim_Position offset by 90.00 towards 135.00 degrees) facing Victim_Position
    • Set unitShad[6] = (Last created unit)
    • Unit - Create 1 Shadow Blademaster for (Owner of caster) at (Victim_Position offset by 90.00 towards 225.00 degrees) facing Victim_Position
    • Set unitShad[7] = (Last created unit)
    • Unit - Create 1 Shadow Blademaster for (Owner of caster) at (Victim_Position offset by 90.00 towards 315.00 degrees) facing Victim_Position
    • Set unitShad[8] = (Last created unit)
    • Animation - Change unitShad[5]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 20.00% transparency
    • Animation - Change unitShad[6]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 20.00% transparency
    • Animation - Change unitShad[7]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 20.00% transparency
    • Animation - Change unitShad[8]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 20.00% transparency
    • Unit - Order unitShad[5] to Attack VictiM
    • Unit - Order unitShad[6] to Attack VictiM
    • Unit - Order unitShad[7] to Attack VictiM
    • Unit - Order unitShad[8] to Attack VictiM
    • Special Effect - Create a special effect at Victim_Position using Units\Undead\Abomination\AbominationExplosion.mdl
    • Set spceff[2] = (Last created special effect)
    • Trigger - Turn on BladesMOVE <gen>
    • Wait 2.00 seconds
    • For Each Integer tmp8 from 1 to 4, do actions
      • Animation - Play unitShad[tmp8]'s Attack Walk Stand Spin animation
      • Animation - Play unitShad[tmp8+4]'s Attack Slam animation
    • Wait 1.00 seconds
    • Trigger - Turn off BladesMOVE <gen>
    • For Each Integer tmp9 from 1 to 8, do actions
      • Unit - Order unitShad[tmp9] to Orc Tauren Chieftain - War Stomp
      • Unit - Add a 2.00 second Generic expiration timer to unitShad[tmp9]
      • Unit - Add a 2.00 second Generic expiration timer to blade[tmp9]
    • Unit - Order caster to Attack VictiM
    • Wait 1.00 seconds
    • Special Effect - Destroy spceff[1]
    • Special Effect - Destroy spceff[2]
    • Selection - Add caster to selection for (Owner of caster)
    • Selection - Add VictiM to selection for (Owner of VictiM)
    • Animation - Change caster's animation speed to 100.00% of its original speed
    • Camera - Reset camera for (Owner of caster) to standard game-view over 0.00 seconds
    • For Each Integer tmp10 from 1 to 8, do actions
      • Custom script: set udg_unitShad[udg_tmp10] = null
      • Custom script: set udg_blade[udg_tmp10] = null
    • Custom script: set udg_spceff[1] = null
    • Custom script: set udg_caster = null
    • Custom script: set udg_VictiM = null
    • Custom script: call RemoveLocation (udg_Victim_Position)
I added some loops so you get the idea about it. You should first create a local Victim Position and the remove it later on. Dunno if that fixes your Problem, but it advances your Trigger, if you want even better loops and array managment you should move to jass and go for locals.
 
Status
Not open for further replies.
Top