• 🏆 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!

Two spell bugs

Status
Not open for further replies.
Level 9
Joined
Aug 28, 2005
Messages
271
I have problems with two triggered spells.

The first one is based on polymorph and it should morph enemy into a tree (which shouldn't be able to move). The problem is that it always have some move speed. I tried to pause the tree but then it became endless spell-the pause didn't stop
Here is my trigger:

  • Trap Soul pause
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Trap Soul
    • Actions
      • Unit - Pause (Target unit of ability being cast)
      • Wait (5.00 x (Real((Level of Trap Soul for (Casting unit))))) game-time seconds
      • Unit - Unpause (Target unit of ability being cast)
The second spell is a nuke wich should create 16 dummies around the taget and then order them to cast a spell on it. In fact the trigger creates 16 dummies but orders only 1 of them to cast.The dummies also don't disapear after the spell. Here is the trigger:

  • depth strike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Depth Strike
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Unit - Create 1 Flying Dummy for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 512.00 towards 0.00 degrees) facing (Position of (Target unit of ability being cast))
          • Unit - Add Depth Strike wave to (Last created unit)
          • Unit - Set level of Depth Strike wave for (Last created unit) to (Level of Depth Strike for (Casting unit))
          • Unit - Create 1 Flying Dummy for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 512.00 towards 22.50 degrees) facing (Position of (Target unit of ability being cast))
          • Unit - Add Depth Strike wave to (Last created unit)
          • Unit - Set level of Depth Strike wave for (Last created unit) to (Level of Depth Strike for (Casting unit))
          • Unit - Create 1 Flying Dummy for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 512.00 towards 45.00 degrees) facing (Position of (Target unit of ability being cast))
          • Unit - Add Depth Strike wave to (Last created unit)
          • Unit - Set level of Depth Strike wave for (Last created unit) to (Level of Depth Strike for (Casting unit))
          • Unit - Create 1 Flying Dummy for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 512.00 towards 67.50 degrees) facing (Position of (Target unit of ability being cast))
          • Unit - Add Depth Strike wave to (Last created unit)
          • Unit - Set level of Depth Strike wave for (Last created unit) to (Level of Depth Strike for (Casting unit))
          • Unit - Create 1 Flying Dummy for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 512.00 towards 90.00 degrees) facing (Position of (Target unit of ability being cast))
          • Unit - Add Depth Strike wave to (Last created unit)
          • Unit - Set level of Depth Strike wave for (Last created unit) to (Level of Depth Strike for (Casting unit))
          • Unit - Create 1 Flying Dummy for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 512.00 towards 112.50 degrees) facing (Position of (Target unit of ability being cast))
          • Unit - Add Depth Strike wave to (Last created unit)
          • Unit - Set level of Depth Strike wave for (Last created unit) to (Level of Depth Strike for (Casting unit))
          • Unit - Create 1 Flying Dummy for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 512.00 towards 135.00 degrees) facing (Position of (Target unit of ability being cast))
          • Unit - Add Depth Strike wave to (Last created unit)
          • Unit - Set level of Depth Strike wave for (Last created unit) to (Level of Depth Strike for (Casting unit))
          • Unit - Create 1 Flying Dummy for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 512.00 towards 157.50 degrees) facing (Position of (Target unit of ability being cast))
          • Unit - Add Depth Strike wave to (Last created unit)
          • Unit - Set level of Depth Strike wave for (Last created unit) to (Level of Depth Strike for (Casting unit))
          • Unit - Create 1 Flying Dummy for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 512.00 towards 180.00 degrees) facing (Position of (Target unit of ability being cast))
          • Unit - Add Depth Strike wave to (Last created unit)
          • Unit - Set level of Depth Strike wave for (Last created unit) to (Level of Depth Strike for (Casting unit))
          • Unit - Create 1 Flying Dummy for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 512.00 towards 202.50 degrees) facing (Position of (Target unit of ability being cast))
          • Unit - Add Depth Strike wave to (Last created unit)
          • Unit - Set level of Depth Strike wave for (Last created unit) to (Level of Depth Strike for (Casting unit))
          • Unit - Create 1 Flying Dummy for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 512.00 towards 225.00 degrees) facing (Position of (Target unit of ability being cast))
          • Unit - Add Depth Strike wave to (Last created unit)
          • Unit - Set level of Depth Strike wave for (Last created unit) to (Level of Depth Strike for (Casting unit))
          • Unit - Create 1 Flying Dummy for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 512.00 towards 247.50 degrees) facing (Position of (Target unit of ability being cast))
          • Unit - Add Depth Strike wave to (Last created unit)
          • Unit - Set level of Depth Strike wave for (Last created unit) to (Level of Depth Strike for (Casting unit))
          • Unit - Create 1 Flying Dummy for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 512.00 towards 270.00 degrees) facing (Position of (Target unit of ability being cast))
          • Unit - Add Depth Strike wave to (Last created unit)
          • Unit - Set level of Depth Strike wave for (Last created unit) to (Level of Depth Strike for (Casting unit))
          • Unit - Create 1 Flying Dummy for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 512.00 towards 292.50 degrees) facing (Position of (Target unit of ability being cast))
          • Unit - Add Depth Strike wave to (Last created unit)
          • Unit - Set level of Depth Strike wave for (Last created unit) to (Level of Depth Strike for (Casting unit))
          • Unit - Create 1 Flying Dummy for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 512.00 towards 315.00 degrees) facing (Position of (Target unit of ability being cast))
          • Unit - Add Depth Strike wave to (Last created unit)
          • Unit - Set level of Depth Strike for (Last created unit) to (Level of Ethereal Body for (Casting unit))
          • Unit - Create 1 Flying Dummy for (Owner of (Casting unit)) at ((Position of (Target unit of ability being cast)) offset by 512.00 towards 337.50 degrees) facing (Position of (Target unit of ability being cast))
          • Unit - Add Depth Strike wave to (Last created unit)
          • Unit - Set level of Depth Strike wave for (Last created unit) to (Level of Depth Strike for (Casting unit))
          • Unit Group - Pick every unit in (Units owned by (Owner of (Casting unit)) of type Flying Dummy) and do (Unit - Order (Picked unit) to Night Elf Warden - Shadow Strike (Target unit of ability being cast))
          • Wait 1.00 game-time seconds
          • Unit Group - Pick every unit in (Units owned by (Owner of (Casting unit)) of type Flying Dummy) and do (Unit - Remove (Picked unit) from the game)
        • Else - Actions

I hope someone can help
 
Level 6
Joined
Mar 2, 2006
Messages
306
second spell:
let us assume that only one unit in your map can cast this spell (to keep things simpler)
- - - - -
what you need is variables. see the X button on the trigger editor toolbar? declare one point variable called DSTargetPoint, and add this as a first action of your trigger:
  • Set DSTargetPoint = Position of (Target unit of ability being cast)
now, instead of calling that function 32(!) times, replace all those calls with a variable DSTargetPoint. we still have one location-leak, but it's better then 32. if you want to fix that too, add
  • Custom Script: call RemoveLocation( udg_DSTargetPoint )
you are also calling Level of Depth Strike for (Casting unit) 16 times and Owner of (Casting unit) 18 times which is an unneccesary lag. but there is a more important problem - you can not call Casting Unit function after a wait. that is why the last action doesn't work. you had to save casting unit (or even better its owner) at trigger start, then use that variable later...

as for the unit group, i would start with an empty unit group variable DSDummies and add those dummy units as they are created (once) instead of searching the entire map for them (which you did twice). after you use the variable two times, destroy it with
  • Custom Script: call DestroyGroup( udg_DSDummies )

- - - - - - - - - - - - - - - - - - - - - - - -


you probably guessed the problem with first spell (treemorph) - you called Target unit of ability being cast after the wait. while you can fix it with variables, i wouldn't do that. i'd have dummy unit throw ensnare (with no visible buffs of effects) of the same duration. why? because that makes your spell work fine when target is dispelled or killed...
 
Level 9
Joined
Aug 28, 2005
Messages
271
Thanks to all. The spells worked fine at last.

In the first one i used ensnare (thanks edge[d1] ). Strangely even when i set the minimum speed to 0 the tree still moved.

For the second one i used unit group in which i stored the dumies.

One last question. It's not for this section but i don't want to make a new threat just for it.

When I modify the game interface i want to change the upkeep to show the map name author etc. It works fine except the "Gold income rate 100%"- it is changed properly but the 100% stays. Can I remove it?
 
Status
Not open for further replies.
Top