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

Spells problems

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
What seems to be the problem in "Incineration" that it won't properly cast spells when there are enemy units right next to my hero? It just casts at random angles, not in 60*TempInt (60, 120, 180, 240, 300, 360) like it should.
But when there are few enemies around my hero, it casts fine.

The "Phantasm" works fine on 1st level, it cr8es all 5 illusions, but on 2nd, 3rd, 4th and 5th level, it just creates 1 illusion. I have put debug messages in both spells to display the "TempInt" and it displays fine.

Please help me because this is really annoying to me and I can't seem to find solution.

  • Incineration
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Incineration
    • Actions
      • Set TempTrigUnit = (Triggering unit)
      • Set TempPoint = (Position of TempTrigUnit)
      • Animation - Play TempTrigUnit's spell animation
      • For each (Integer TempInt) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set TempReal = (60.00 x (Real(TempInt)))
          • Set TempPoint2 = (TempPoint offset by 20.00 towards TempReal degrees)
          • Unit - Create 1 Dummy Caster for (Owner of TempTrigUnit) at TempPoint facing TempReal degrees
          • Set TempDummyUnit = (Last created unit)
          • Unit - Add a 0.50 second Generic expiration timer to TempDummyUnit
          • Unit - Add Dummy Incineration to TempDummyUnit
          • Unit - Set level of Dummy Incineration for TempDummyUnit to (Level of Incineration for TempTrigUnit)
          • Unit - Order TempDummyUnit to Orc Tauren Chieftain - Shockwave TempPoint2
          • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempPoint2 = null
      • Custom script: set udg_TempTrigUnit = null
      • Custom script: set udg_TempDummyUnit = null
  • Phantasm
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Phantasm
    • Actions
      • Set TempTrigUnit = (Triggering unit)
      • Set TempPoint = (Position of TempTrigUnit)
      • Unit - Create 1 Dummy Caster for (Owner of TempTrigUnit) at TempPoint facing TempPoint
      • Set TempDummyUnit = (Last created unit)
      • Unit - Add a 0.50 second Generic expiration timer to TempDummyUnit
      • Unit - Add Dummy Phantasm to TempDummyUnit
      • Unit - Set level of Dummy Phantasm for TempDummyUnit to (Level of Phantasm for TempTrigUnit)
      • For each (Integer TempInt) from 1 to 5, do (Actions)
        • Loop - Actions
          • Custom script: call IssueTargetOrderById(udg_TempDummyUnit, 852274, udg_TempTrigUnit)
      • Special Effect - Create a special effect attached to the overhead of TempTrigUnit using Abilities\Spells\Orc\FeralSpirit\feralspiritdone.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the origin of TempTrigUnit using Abilities\Spells\Orc\FeralSpirit\feralspiritdone.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempTrigUnit = null
      • Custom script: set udg_TempDummyUnit = null
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
Give the dummy unit a normal visible model and try the spell... maybe those units get incorrectly placed when clustered together because of incorrectly set fields in object editor? Can't think of anything else based on your description.

Also, I believe the first spell can be achieved with only 1 dummy unit casting all 6 shockwaves.

As for the second spell - I dunno :(
 
Level 18
Joined
May 11, 2012
Messages
2,103
I will remake 1st spell so only 1 dummy casts all 6 shockwaves, and use setUnitXY to place dummy unit at defined angles correctly. That should do it?

The dummy unit is fly with 500 height, 0 collision, 0.10 turn rate, what else...
 
Level 18
Joined
May 11, 2012
Messages
2,103
Still didn't manage to fix the problems.
I guess it is just impossible to do it with "For" loop, so I remade it without the loop, and made actions for each cast.

does this seems fine?
  • Incineration
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Incineration
    • Actions
      • -------- =========== Start of the Spell =========== --------
      • Set TempTrigUnit = (Triggering unit)
      • Set TempPoint = (Position of TempTrigUnit)
      • -------- =========== 60° =========== --------
      • Set TempReal = 60.00
      • Set TempPoint2 = (TempPoint offset by 10.00 towards TempReal degrees)
      • Unit - Create 1 Dummy Caster for (Owner of TempTrigUnit) at TempPoint facing TempReal degrees
      • Set TempDummyUnit = (Last created unit)
      • Unit - Add a 0.50 second Generic expiration timer to TempDummyUnit
      • Unit - Add Dummy Incineration to TempDummyUnit
      • Unit - Set level of Dummy Incineration for TempDummyUnit to (Level of Incineration for TempTrigUnit)
      • Unit - Order TempDummyUnit to Orc Tauren Chieftain - Shockwave TempPoint2
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • -------- =========== 120° =========== --------
      • Set TempReal = 120.00
      • Set TempPoint2 = (TempPoint offset by 10.00 towards TempReal degrees)
      • Unit - Create 1 Dummy Caster for (Owner of TempTrigUnit) at TempPoint facing TempReal degrees
      • Set TempDummyUnit = (Last created unit)
      • Unit - Add a 0.50 second Generic expiration timer to TempDummyUnit
      • Unit - Add Dummy Incineration to TempDummyUnit
      • Unit - Set level of Dummy Incineration for TempDummyUnit to (Level of Incineration for TempTrigUnit)
      • Unit - Order TempDummyUnit to Orc Tauren Chieftain - Shockwave TempPoint2
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • -------- =========== 180° =========== --------
      • Set TempReal = 180.00
      • Set TempPoint2 = (TempPoint offset by 10.00 towards TempReal degrees)
      • Unit - Create 1 Dummy Caster for (Owner of TempTrigUnit) at TempPoint facing TempReal degrees
      • Set TempDummyUnit = (Last created unit)
      • Unit - Add a 0.50 second Generic expiration timer to TempDummyUnit
      • Unit - Add Dummy Incineration to TempDummyUnit
      • Unit - Set level of Dummy Incineration for TempDummyUnit to (Level of Incineration for TempTrigUnit)
      • Unit - Order TempDummyUnit to Orc Tauren Chieftain - Shockwave TempPoint2
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • -------- =========== 240° =========== --------
      • Set TempReal = 240.00
      • Set TempPoint2 = (TempPoint offset by 10.00 towards TempReal degrees)
      • Unit - Create 1 Dummy Caster for (Owner of TempTrigUnit) at TempPoint facing TempReal degrees
      • Set TempDummyUnit = (Last created unit)
      • Unit - Add a 0.50 second Generic expiration timer to TempDummyUnit
      • Unit - Add Dummy Incineration to TempDummyUnit
      • Unit - Set level of Dummy Incineration for TempDummyUnit to (Level of Incineration for TempTrigUnit)
      • Unit - Order TempDummyUnit to Orc Tauren Chieftain - Shockwave TempPoint2
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • -------- =========== 300° =========== --------
      • Set TempReal = 300.00
      • Set TempPoint2 = (TempPoint offset by 10.00 towards TempReal degrees)
      • Unit - Create 1 Dummy Caster for (Owner of TempTrigUnit) at TempPoint facing TempReal degrees
      • Set TempDummyUnit = (Last created unit)
      • Unit - Add a 0.50 second Generic expiration timer to TempDummyUnit
      • Unit - Add Dummy Incineration to TempDummyUnit
      • Unit - Set level of Dummy Incineration for TempDummyUnit to (Level of Incineration for TempTrigUnit)
      • Unit - Order TempDummyUnit to Orc Tauren Chieftain - Shockwave TempPoint2
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • -------- =========== 360° =========== --------
      • Set TempReal = 360.00
      • Set TempPoint2 = (TempPoint offset by 10.00 towards TempReal degrees)
      • Unit - Create 1 Dummy Caster for (Owner of TempTrigUnit) at TempPoint facing TempReal degrees
      • Set TempDummyUnit = (Last created unit)
      • Unit - Add a 0.50 second Generic expiration timer to TempDummyUnit
      • Unit - Add Dummy Incineration to TempDummyUnit
      • Unit - Set level of Dummy Incineration for TempDummyUnit to (Level of Incineration for TempTrigUnit)
      • Unit - Order TempDummyUnit to Orc Tauren Chieftain - Shockwave TempPoint2
      • -------- =========== Clearing Leaks =========== --------
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempPoint2 = null
      • Custom script: set udg_TempTrigUnit = null
      • Custom script: set udg_TempDummyUnit = null
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
The dummy movement speed should be 0 so the unit does not have to turn at all.

On the second one my only suggestion would to be give the dummy a longer life or the ms issue again

Edit: Also change the base spell from shockwave. It makes a terrain deformation that leaks so. .breath of fire/carrion swarm
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
The problem is that the dummies aren't getting placed in the right location due to the pathing check, and since your offset is so tiny even a small change in the dummy's position can make a massive difference in the angle that it fires at. Move your dummy back to the original point you want it at via SetUnitX and SetUnitY to ensure it's firing from the right location. You may also wish to increase the offset range a bit too.
 
Level 18
Joined
May 11, 2012
Messages
2,103
The problem is that the dummies aren't getting placed in the right location due to the pathing check, and since your offset is so tiny even a small change in the dummy's position can make a massive difference in the angle that it fires at. Move your dummy back to the original point you want it at via SetUnitX and SetUnitY to ensure it's firing from the right location. You may also wish to increase the offset range a bit too.

Dude, you're a fucking life-saver hahah
I just had to increase the offset range, how come I never thought of that
Also, can you fix my second spell? :D
it casts illusions only 1
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
#2 is almost certainly an object editor issue if it does in fact work at level 1, but I'm more surprised that it works at level 1 than that it breaks at the other levels. Issuing 5 orders with no delay will just overwrite four of them. You should create move the dummy creation/destruction into the loop so that each image is cast by a separate dummy.
 
Status
Not open for further replies.
Top