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

Strange error in my script?

Status
Not open for further replies.
Level 2
Joined
Dec 23, 2007
Messages
23
This just recently appeared with the addition of a new spell in my map. I've examined the code for awhile and I can't see any reason why its not working.
The very last 'water' that shoots does not shoot to the angle that the ability was cast to but rather shoots off to the right. Here is the script

  • rapid Create water
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Shoot Rapid Fire
    • Actions
      • Set PointRapid[2] = (Position of (Casting unit))
      • Special Effect - Create a special effect at Point[2] using Abilities\Weapons\GryphonRiderMissile\GryphonRiderMissileTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation( udg_PointRapid[2] )
      • Set b = (Position of (Casting unit))
      • Unit - Create 1 Rapid Water for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by 120.00 towards (Angle from (Position of (Casting unit)) to (Target point of ability being cast)) degrees) facing (Angle from b to (Target point of ability being cast)) degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Wait 0.20 seconds
      • Unit - Turn collision for (Last created unit) Off
      • Unit - Create 1 Rapid Water for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by 120.00 towards (Angle from (Position of (Casting unit)) to (Target point of ability being cast)) degrees) facing (Angle from b to (Target point of ability being cast)) degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Wait 0.20 seconds
      • Unit - Turn collision for (Last created unit) Off
      • Unit - Create 1 Rapid Water for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by 120.00 towards (Angle from (Position of (Casting unit)) to (Target point of ability being cast)) degrees) facing (Angle from b to (Target point of ability being cast)) degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Wait 0.20 seconds
      • Unit - Turn collision for (Last created unit) Off
      • Unit - Create 1 Rapid Water for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by 120.00 towards (Angle from (Position of (Casting unit)) to (Target point of ability being cast)) degrees) facing (Angle from b to (Target point of ability being cast)) degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Wait 0.20 seconds
      • Custom script: call RemoveLocation( udg_b )
      • Unit - Turn collision for (Last created unit) Off
If anyone knows how to fix it please let me now.
Merry Christmas :wsmile:

EDIT: I found the error, the last 'water' is going to the center of playable map area. But it says nowhere in my trigger to move to center of playable map area.
 
Level 3
Joined
Dec 16, 2007
Messages
38
Check all the Custom Scripts and Global Variables. Maybe it is causing the error.
 
Level 2
Joined
Dec 23, 2007
Messages
23
It's come to my attention that it does it with the last one regardless of how many spawn. I have no custom script and have checked my variables.
 
Status
Not open for further replies.
Top