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

Spell doesn't work as it should

Status
Not open for further replies.
Level 7
Joined
Oct 10, 2009
Messages
111
  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
    • (Ability being cast) Equal to Battle Roar
  • Actions
    • Set br_caster = (Casting unit)
    • Set br_aoe = ((Level of Battle Roar for br_caster) x 250)
    • Set br_damage[0] = (((Level of Battle Roar for br_caster) x 50) + ((Agility of br_caster (Include bonuses)) x 2))
    • Special Effect - Create a special effect attached to the chest of br_caster using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
    • Special Effect - Create a special effect at (Position of br_caster) using Abilities\Spells\Other\Stampede\StampedeMissile.mdl
    • Set br_sp_effect[0] = (Last created special effect)
    • Special Effect - Destroy br_sp_effect[0]
    • Unit Group - Pick every unit in (Units owned by Player 12 (Brown)) and do (Actions)
      • Loop - Actions
        • Unit - Cause br_caster to damage (Triggering unit), dealing (Real(br_damage[0])) damage of attack type Spells and damage type Magic
        • Special Effect - Create a special effect at (Position of br_caster) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
        • Special Effect - Create a special effect at (Position of br_caster) using Abilities\Spells\Demon\DemonBoltImpact\DemonBoltImpact.mdl
The point of the ability is to damage enemy units around the casting target and passively increase damage (that's in object editor). However, ability damages only the casting target and not the targets around. There's probably leak somewhere there, but I couldn't figure out where it is.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Unit - Cause br_caster to damage (Triggering unit), dealing (Real(br_damage[0])) damage of attack type Spells and damage type Magic
Change (Triggering unit) to (Picked unit)

But this will damage all units owned by Player 12 wherever they are, not only around the caster.

This will tackle problem;
  • Unit Group - Pick every unit in (Units within br_aoe of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
    • Loop - Actions
Units In Range Matching Condition

(Target point of ability being cast) is Point leak, to solve it;
  • Actions
    • Set TargetLoc = (Target point of ability being cast)
    • Unit Group - Pick every unit in (Units within br_aoe of TargetLoc matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
      • Loop - Actions
    • Custom script: call RemoveLocation(udg_TempLoc)
This will clear the Point leak.
 
Level 7
Joined
Oct 10, 2009
Messages
111
Change (Triggering unit) to (Picked unit)

But this will damage all units owned by Player 12 wherever they are, not only around the caster.

This will tackle problem;
  • Unit Group - Pick every unit in (Units within br_aoe of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
    • Loop - Actions
Units In Range Matching Condition

(Target point of ability being cast) is Point leak, to solve it;
  • Actions
    • Set TargetLoc = (Target point of ability being cast)
    • Unit Group - Pick every unit in (Units within 512.00 of TargetLoc matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
      • Loop - Actions
    • Custom script: call RemoveLocation(udg_TempLoc)
This will clear the Point leak.

I used

  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Set br_caster = (Casting unit)
    • Set br_aoe = ((Level of Battle Roar for br_caster) x 250)
    • Set br_damage[0] = (((Level of Battle Roar for br_caster) x 50) + ((Agility of br_caster (Include bonuses)) x 2))
    • Special Effect - Create a special effect attached to the chest of br_caster using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
    • Special Effect - Create a special effect at (Position of br_caster) using Abilities\Spells\Other\Stampede\StampedeMissile.mdl
    • Set br_sp_effect[0] = (Last created special effect)
    • Special Effect - Destroy br_sp_effect[0]
    • Unit Group - Pick every unit in (Units owned by Player 12 (Brown)) and do (Actions)
      • Loop - Actions
        • Unit - Cause br_caster to damage (Picked unit), dealing (Real(br_damage[0])) damage of attack type Spells and damage type Magic
        • Special Effect - Create a special effect at (Position of br_caster) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
        • Special Effect - Create a special effect at (Position of br_caster) using Abilities\Spells\Demon\DemonBoltImpact\DemonBoltImpact.mdl
And it works fine :) So tnx :)
 
Status
Not open for further replies.
Top