• 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] Simple Custom Spell Problem ( I Hope )

Status
Not open for further replies.
Level 2
Joined
Apr 29, 2012
Messages
20
I made a spell based off of thunder clap, and the idea is that it calls down lightning bolts to strike all enemies within a certain range of the caster.

here's my trigger:


Code:
Bolt Strike
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Bolt Strike
    Actions
        Unit Group - Pick every unit in (Units within 50.00 of (Position of (Casting unit)) matching ((Owner of (Matching unit)) Equal to Player 11 (Dark Green))) and do (Actions)
            Loop - Actions
                Set tempPoint[1] = (Position of (Picked unit))
                Special Effect - Create a special effect at tempPoint[1] using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
                Custom script:   call RemoveLocation(udg_tempPoint[1])

Anybody have ideas how to get this to work? It probably has something to do with the "tempPoint", not sure if that works with multiples. Even then, though, wouldnt I see at least 1 lightning bolt? I dont see anything currently!

Thanks in advance
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Use Event - Starts the effect of an ability

Do not use Begins casting an ability, it could be bug (depends on the situation), but in yours, it's better to use what I stated at the above

50 is such a small radius and your condition for matching unit is wrong, it should be

  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within 600.00 of (Position of (Triggering unit)) matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
    • Loop - Actions
It's under Boolean Comparison - Unit - Unit Belongs To An Enemy Of Player

Also, you leak Unit Group, follow what I gave, then the leak is cleaned

For the Point leak, I'm lazy :p
 
Level 2
Joined
Apr 29, 2012
Messages
20
Awesome, sweet. Thanks to you and someone else I was able to work out the kinks, I think.

The spell is kind of quiet, though. I remember hearing a lightning type sound somewhere ingame, I'm off to locate it now.

Also, is there a way to turn off the "ground rolling" effect when casting thunder clap? doesnt really fit with my spells theme.

Thanks for all the help.
 
Status
Not open for further replies.
Top