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

Black Box spell

Status
Not open for further replies.
Level 1
Joined
May 18, 2008
Messages
6
ok i just created this really fast and not sure why its messing up[creates 100 boxes does no dmg and doesnt dissapear] heres the trigger
  • Black Box
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Black box
    • Actions
      • Set Caster = (Casting unit)
      • Set Target = (Target unit of ability being cast)
      • Set BlackBox = Black box 0066 <gen>
      • Unit - Pause Target
      • Unit - Pause Caster
      • Animation - Play Caster's spell animation
      • Unit - Create 1 Black box for (Triggering player) at (Position of Target) facing (Position of Target)
      • Special Effect - Create a special effect attached to the origin of Target using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
      • Unit - Remove BlackBox from the game
      • Special Effect - Destroy (Last created special effect)
      • Unit - Unpause Target
      • Unit - Unpause Caster
      • Set BlackBox = No unit
      • Set Caster = No unit
      • Set Target = No unit
please help?btw idk how to set the variable BlackBox to the normal unit not the region one
 
Level 12
Joined
Mar 23, 2008
Messages
942
Instead of "begins casting a ability", uses "starts the effect of a ability"
Instead of removing the box, add a generic expiration timer to it.
Instead of (Triggering player) uses (Owner of (casting unit))
Don't pause the unit, remove the pause/unpause.

The error is because the unit is being paused while try to cast, so the trigger run, and the unit unpause and try to cast again, its paused and the trigger run, the unit unpause and tray again again to cast and its paused again again...

got it?
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
I think he thought that the special effect would do the damage.
Add and action Unit Damage area(target).
 
Level 1
Joined
May 18, 2008
Messages
6
alright i did what you guys said and it does work!but theres one little problem...... caster gets a blue flame around him(maybe cause of special effect)and just freezes heres the updated version
  • Black Box
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Black box
    • Actions
      • Set Caster = (Casting unit)
      • Set Target = (Target unit of ability being cast)
      • Set BlackBox = Black box 0066 <gen>
      • Animation - Play Caster's spell animation
      • Unit - Create 1 Black box for (Owner of Caster) at (Position of Target) facing (Position of Target)
      • Environment - Create a 0.50 second Temporary crater deformation at (Position of Target) with radius 512.00 and depth 64.00
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Special Effect - Create a special effect attached to the origin of BlackBox using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
      • Special Effect - Destroy (Last created special effect)
      • Set BlackBox = No unit
      • Set Caster = No unit
      • Set Target = No unit
      • Custom script: call RemoveUnit(udg_Caster)
      • Custom script: call RemoveUnit(udg_Target)
      • Custom script: call RemoveUnit(udg_BlackBox)
and tell me how tyo make it leak free too if you can
 
Level 12
Joined
Mar 23, 2008
Messages
942
  • Black Box
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Black box
    • Actions
      • Set Caster = (Casting unit)
      • Set Target = (Target unit of ability being cast)
      • Set BlackBox = Black box 0066 <gen>
      • Set temppoint = (Position of (Casting unit)
      • Set temppoint2 = (Position of (Target of (ability being cast))
      • Animation - Play (Caster) spell animation
      • Environment - Create a 0.50 second Temporary crater deformation at (temppoint2) with radius 512.00 and depth 64.00
      • Unit - Create 1 Black box for (Owner of Caster) at (temppoint) facing (Position of (Target of (ability being cast)))
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_tempoint)
      • Custom script: call RemoveLocation(udg_tempoint2)
I don't know what are you telling. But try this.
(Don't need to set unit to null, and I don't even know if exist call removeunit)
 
Level 1
Joined
May 18, 2008
Messages
6
So like this?
  • Black Box
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Black box
    • Actions
      • Set Caster = (Casting unit)
      • Set Target = (Target unit of ability being cast)
      • Set Point1 = (Position of (Casting unit))
      • Set Point2 = (Position of (Target unit of ability being cast))
      • Animation - Play Caster's spell animation
      • Unit - Create 1 Black box for (Owner of Caster) at (Position of Target) facing (Position of Target)
      • Environment - Create a 0.50 second Temporary crater deformation at (Position of Target) with radius 512.00 and depth 64.00
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Special Effect - Create a special effect attached to the origin of BlackBox using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
      • Special Effect - Destroy (Last created special effect)
      • Set Caster = No unit
      • Set Target = No unit
      • Custom script: call RemoveLocation(udg_Point1)
      • Custom script: call RemoveLocation(udg_Point2)
 
Last edited:
Status
Not open for further replies.
Top