• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Problem with a spell!

Status
Not open for further replies.
Level 10
Joined
May 28, 2009
Messages
223
Okey, here is the problem:

I've made a spell that I call Frozen Spirits which is pretty much finished.
But the problem is that I cant get the damage to occur after the spell hits the targets.
It damage the targeted units directly after choosing the target of the spell. The hole thing just looks horrible.
If my english is un clear, just try my attached map and I think you understand what's my problem.
Check this out:
  • Frozen Spirits
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Frozen Spirits
    • Actions
      • Set FrozenSpiritsLoc = (Target point of ability being cast)
      • Set FrozenSpiritsCaster = (Casting unit)
      • Set FrozenSpiritsLevel = 1
      • Set FrozenSpiritsLevel = (FrozenSpiritsLevel x (Level of Frozen Spirits for (Casting unit)))
      • Unit Group - Pick every unit in (Units within 250.00 of FrozenSpiritsLoc) and do (Unit Group - Add (Picked unit) to FrozenSpiritDamage)
      • Trigger - Turn on Frozen Spirits Slow <gen>
  • Frozen Spirits Slow
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 1 dummy 2 for (Owner of FrozenSpiritsCaster) at FrozenSpiritsLoc facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Set level of Frozen Spirits (Slow effect) for (Last created unit) to FrozenSpiritsLevel
      • Unit Group - Pick every unit in FrozenSpiritDamage and do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\FrostArmor\FrostArmorDamage.mdl
      • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
      • Trigger - Turn off (This trigger)

Please respond! (I usually has a hard time getting anyone to awnser any of my forum post regarding help *boho*)
 

Attachments

  • Spell Help.w3x
    15.9 KB · Views: 43
Last edited:
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

1) Sure they get directly damage if you cast it because of " Unit - A unit starts the effect of an ability"

2) I saw that you use the "Healing Spray" ability for you spell. Just use negative healing amounts - so the healing equal to damage ( you need to hold shit and double click it )

This would be the easiest way to get a good spell - and btw your trigger leaks =D
 
Level 10
Joined
May 28, 2009
Messages
223
1) Sure they get directly damage if you cast it because of " Unit - A unit starts the effect of an ability"

So if I set the Event to Unit - '' A unit finishes casting an ability '' the damage should apply after the spell is cast?

2) I saw that you use the "Healing Spray" ability for you spell. Just use negative healing amounts - so the healing equal to damage ( you need to hold shit and double click it )

I dont want the spell to damage with every wave, I want the waves to damage every one equally, Like a one shot blizzard, but with the cool spraying spell still there.

This would be the easiest way to get a good spell - and btw your trigger leaks =D

What kind of leak? And were is it?

*Edit*
Yea, now I got the thing to work almost properly.
I did as you said and set the values to negative healing.
I also removed the middle trigger (because its not needed)
But the slow effect is still getting cast directly when I choose the target of the spell,
is there a way to create the dummy unit when the first unit recieves (spelling?) damage of the spell?
 
Last edited:
You leak groups, you leak special effects and you leak positions.

You are storing the position in a variable, but never destroying them.
Use custom scripts for that. In your case write "call RemoveLocation(udg_FrozenSpiritsLoc)".
Store the group in a variable and remove it afterwards with "call RemoveLocation(udg_GROUPVARIABLE)".
For the special effects, always just put a extra line under the special effect.
"Special effect - Destroy last created special effect".

I hope this helped you. If you want to learn more about leaks, check the tutorial forum.
 
Level 10
Joined
May 28, 2009
Messages
223
Ok, this is how the trigger looks now:

  • Frozen Spirits
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Frozen Spirits
    • Actions
      • Set FrozenSpiritsLoc = (Target point of ability being cast)
      • Set FrozenSpiritsCaster = (Casting unit)
      • Set FrozenSpiritsLevel = 1
      • Set FrozenSpiritsLevel = (Level of Frozen Spirits for FrozenSpiritsCaster)
      • Trigger - Turn on Frozen Spirits Slow <gen>

  • Frozen Spirits Slow
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 1 dummy 2 for (Owner of FrozenSpiritsCaster) at FrozenSpiritsLoc facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Set level of Frozen Spirits (Slow effect) for (Last created unit) to FrozenSpiritsLevel
      • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
      • Custom script: call RemoveLocation(udg_FrozenSpiritsLoc)
      • Trigger - Turn off (This trigger)
Does it still leak? ( it's much more simple when I dont have to apply the damage to the targeted units ).
 

Attachments

  • Spell Help [Fixed 0.1].w3x
    15.5 KB · Views: 53
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

This just an idea:

1) In your first trigger add: Unit - Create 1 dummy .... Now you give this dummy unit Generic timer over the full spell duration and set the level of ability to what ever

2) ( You can delete your second trigger now )

3) Create a trigger that use the following:
  • Slow
    • Events:
      • Time - Every 0.10 seconds of game time
    • Conditions:
    • Actions:
      • Custom script: set_bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to (TheDummy))) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked Unit) to [The slow ability]
          • Unit - Order (Picked unit) to Right-Click (Position of (Picked unit))
I think it was "Unit - Order (Picked unit) to Right-Click (Position of (Picked unit))" for deleting this "cooldown".
 
Level 10
Joined
May 28, 2009
Messages
223
I can't get your trigger to work Dr. Boom.
I've kept on trying different things,
and storing the distance of target location
and caster location into a real variable seemed smart at first sight,
but then wait that amount of time divided with different number wont work
Like this:

  • Frozen Spirits
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Frozen Spirits
    • Actions
      • Set FrozenSpiritCasterLoc = (Position of (Casting unit))
      • Set FrozenSpiritsLoc = (Target point of ability being cast)
      • Set FrozenSpiritsCaster = (Casting unit)
      • Set FrozenSpiritsLevel = 1
      • Set FrozenSpiritsLevel = (Level of Frozen Spirits for FrozenSpiritsCaster)
      • Set FrozenSpiritsDistance = (Distance between FrozenSpiritCasterLoc and FrozenSpiritsLoc)
      • Wait (FrozenSpiritsDistance / 20.00) seconds
      • Unit - Create 1 dummy 2 for (Owner of FrozenSpiritsCaster) at FrozenSpiritsLoc facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Set level of Frozen Spirits (Slow effect) for (Last created unit) to FrozenSpiritsLevel
      • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
      • Custom script: call RemoveLocation(udg_FrozenSpiritsLoc)
      • Custom script: call RemoveLocation(udg_FrozenSpiritCasterLoc)
But sometimes the dummy unit doesn't seem to show up because he is waiting for like an hour or so when the ability is cast at full range, and he doens't show up at all when the ability is cast too close to the caster.

*edit*
Scratched this idea, it reaches far beyond (spelling?) my skill:thumbs_down:
 
Last edited:
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

  • Frozen Spirits 2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Frozen Spirits
    • Actions
      • Set FrozenSpiritsLoc = (Target point of ability being cast)
      • Set FrozenSpiritsCaster = (Casting unit)
      • Unit - Create 1 dummy 2 for (Owner of FrozenSpiritsCaster) at FrozenSpiritsLoc facing (Position of FrozenSpiritsCaster)
      • Unit - Set level of Thunder Clap for (Last created unit) to (Level of (Ability being cast) for FrozenSpiritsCaster)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_FrozenSpiritsLoc)
  • Frozen Spirits Slow 2
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to dummy 2)) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Human Mountain King - Thunder Clap
          • Unit - Order (Picked unit) to Right-Click (Position of (Picked unit))
This leakless and MUI <-- but the dummy will be created before the missiles reach the target area. I don't know how to change this - but this is only something like a half second.
 
Level 10
Joined
May 28, 2009
Messages
223
  • Custom script: set bj_wantDestroyGroup = true
How do I get this custom script to work?
The trigger editor gets an error when I start the map with this Script added.

*edit*
Found the problem... I was miss spelling (lol)
Awesome stuff Dr. Boom, thanks so much. + Rep to all who helped me during this little adventure XD
 
Last edited:
Status
Not open for further replies.
Top