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

[Trigger] Group Arrays

Status
Not open for further replies.
Level 12
Joined
Aug 20, 2007
Messages
866
I have found that GUI triggers that use unit group arrays bug

I don't know why, but if anybody can tell me that would be great
 
Level 12
Joined
Aug 20, 2007
Messages
866
I *think* im doin something wrong

  • Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blast Wave
    • Actions
      • Set TempPoint = (Position of (Casting unit))
      • Unit - Create 1 Peasant (Dummy) for (Owner of (Casting unit)) at TempPoint facing (Facing of (Casting unit)) degrees
      • Unit - Add a 0.10 second Generic expiration timer to (Last created unit)
      • Unit Group - Add (Last created unit) to Transitions[1]
      • Special Effect - Create a special effect at TempPoint using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- Clear Leaks --------
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: set udg_TempPoint = null
  • Transition1
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is in Transitions[1]) Equal to True
    • Actions
      • Unit Group - Remove (Dying unit) from Transitions[1]
      • Set TempPoint = (Position of (Dying unit))
      • Set TempPoint2 = (TempPoint offset by 100.00 towards (Facing of (Dying unit)) degrees)
      • Unit - Create 1 Peasant (Dummy) for (Owner of (Casting unit)) at TempPoint2 facing (Facing of (Casting unit)) degrees
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Unit Group - Add (Last created unit) to Transitions[2]
      • Special Effect - Create a special effect at TempPoint2 using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- Clear Leaks --------
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempPoint2 = null
  • Transition2
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is in Transitions[2]) Equal to True
    • Actions
      • Unit Group - Remove (Dying unit) from Transitions[2]
      • Set TempPoint = (Position of (Dying unit))
      • Set TempPoint2 = (TempPoint offset by 100.00 towards (Facing of (Dying unit)) degrees)
      • Unit - Create 1 Peasant (Dummy) for (Owner of (Casting unit)) at TempPoint2 facing (Facing of (Casting unit)) degrees
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Unit Group - Add (Last created unit) to Transitions[3]
      • Special Effect - Create a special effect at TempPoint2 using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- Clear Leaks --------
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempPoint2 = null
  • Transition3
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is in Transitions[3]) Equal to True
    • Actions
      • Unit Group - Remove (Dying unit) from Transitions[3]
      • Set TempPoint = (Position of (Dying unit))
      • Set TempPoint2 = (TempPoint offset by 100.00 towards (Facing of (Dying unit)) degrees)
      • Unit - Create 1 Peasant (Dummy) for (Owner of (Casting unit)) at TempPoint2 facing (Facing of (Casting unit)) degrees
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Unit Group - Add (Last created unit) to Transitions[4]
      • Special Effect - Create a special effect at TempPoint2 using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- Clear Leaks --------
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempPoint2 = null
  • Transition4
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is in Transitions[4]) Equal to True
    • Actions
      • Unit Group - Remove (Dying unit) from Transitions[4]
      • Set TempPoint = (Position of (Dying unit))
      • Set TempPoint2 = (TempPoint offset by 100.00 towards (Facing of (Dying unit)) degrees)
      • Unit - Create 1 Peasant (Dummy) for (Owner of (Casting unit)) at TempPoint2 facing (Facing of (Casting unit)) degrees
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Unit Group - Add (Last created unit) to Transitions[5]
      • Special Effect - Create a special effect at TempPoint2 using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- Clear Leaks --------
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempPoint2 = null
  • Transition5
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is in Transitions[5]) Equal to True
    • Actions
      • Unit Group - Remove (Dying unit) from Transitions[5]
      • Set TempPoint = (Position of (Dying unit))
      • Set TempPoint2 = (TempPoint offset by 100.00 towards (Facing of (Dying unit)) degrees)
      • Unit - Create 1 Peasant (Dummy) for (Owner of (Casting unit)) at TempPoint2 facing (Facing of (Casting unit)) degrees
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Special Effect - Create a special effect at TempPoint2 using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- Clear Leaks --------
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempPoint2 = null
I'm not sure whats wrong, but from what actually happens vs. what I wanted, the trigger only uses the first index of the unit group
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
First - your main problem is that you did "create unit for owner of CASTING unit" , there is not casting unit here, thus it should be "owner of triggering/dying unit".

Now just a suggestion - you should use "triggering unit" if you can, it bugs less.

And a question , why do you do "null" to the points ? (dunno what that does, but I guess null = totaly destroy ?).
 
Level 12
Joined
Aug 20, 2007
Messages
866
Nulls

Yeah I'm pretty sure you don't need to null them

Although it is rumored that it could leak :week:, so just to be careful I like to null the variables

F*CK I always make that damned mistake >< :ugly:

Hah :wsmile:, thanks for pointing that out to me, I CnP the triggs for speed, and I always forget to change some things

Dying Unit
Casting Unit

Only like 4 letters are different :wbored:
 
Status
Not open for further replies.
Top