• 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 not working properly

Status
Not open for further replies.
Level 5
Joined
Nov 7, 2007
Messages
134
I have a spell which basically causes the caster to teleport to the target, deal damage to and stun the target, while receiving a lesser damage and stun itself. Atleast this is the idea, and everything works except for the teleportation and the display of a special effect at the target. The trigger looks like this:

  • Events
    • Unit- A unit Finishes casting an ability
  • Conditions
    • (Ability being cast) Equal to Unstable Concoction (Custom)
  • Actions
    • Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using *the human-building-blowing-up-animation*
    • Unit - Move (Triggering uni) instantly to (Position of (Target unit of ability being cast))
    • Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 200.00 damage of attack type Spells and damage type Normal
    • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
    • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
    • Unit - Add Stun (Neutral Hostile) to (Last created unit)
    • Unit - Order (Last created unit) to Neutral - Firebolt (Triggering unit)
So yeah, everything works except that the caster is not moved to the target and the special effect is not displayed. It seems it doesn't accept (Position of (Target unit of ability being cast)) as a valid point or something. Anyway, anyone who can figure this out, or present an alternate solution?
 
I have a spell which basically causes the caster to teleport to the target, deal damage to and stun the target, while receiving a lesser damage and stun itself. Atleast this is the idea, and everything works except for the teleportation and the display of a special effect at the target. The trigger looks like this:

  • Events
    • Unit- A unit Finishes casting an ability
  • Conditions
    • (Ability being cast) Equal to Unstable Concoction (Custom)
  • Actions
    • Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using *the human-building-blowing-up-animation*
    • Unit - Move (Triggering uni) instantly to (Position of (Target unit of ability being cast))
    • Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 200.00 damage of attack type Spells and damage type Normal
    • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
    • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
    • Unit - Add Stun (Neutral Hostile) to (Last created unit)
    • Unit - Order (Last created unit) to Neutral - Firebolt (Triggering unit)
So yeah, everything works except that the caster is not moved to the target and the special effect is not displayed. It seems it doesn't accept (Position of (Target unit of ability being cast)) as a valid point or something. Anyway, anyone who can figure this out, or present an alternate solution?

Better use variables for caster and target. Damage the target please, because right now u damage the triggering unit - the caster. Basicaly: triggering unit is here a caster.
Use varialbes(points) instead of using position of a unit - it can cause leaks latter.

EDIT if its just a special effect for a while the ability effect is applied, destroy it instantly after creating.
if its not, remember to set is as variable, and destroy letter on or it also will lead to leak.
 
Level 5
Joined
Nov 7, 2007
Messages
134
Better use variables for caster and target. Damage the target please, because right now u damage the triggering unit - the caster. Basicaly: triggering unit is here a caster.
Use varialbes(points) instead of using position of a unit - it can cause leaks latter.

EDIT if its just a special effect for a while the ability effect is applied, destroy it instantly after creating.
if its not, remember to set is as variable, and destroy letter on or it also will lead to leak.

It is supposed to damage the caster, like I said the spell damages both the caster and the target.

But thanks for the anti-leak tips, I'll be sure to consider it.

As for Maker's reply, I originally used Starts the effect of an ability, but the spell messed up in other ways then. The spell is based on Firebolt, and carries out the effect of Firebolt + the effects of this trigger. However, when I used Starts the effect of an ability, only the trigger effects ran, while the spell effects for some reason did not (the spell was not technically cast at all, so there were no cooldown or anything). When changing the event to Finishes casting an ability, this problem was solved. So does anyone know what this first problem might've been?

(Changing back to Starts the effect of an ability solved my previously mentioned issues btw, so thanks for that).

EDIT: Never mind, I solved it myself. But thanks for your help and tips, +rep for the both of you! So this is solved then.
 
Status
Not open for further replies.
Top