• 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] Problem with a spell help plz

Status
Not open for further replies.
Level 19
Joined
Feb 15, 2008
Messages
2,184
here is the trigger the spell isent working :S

  • Activation
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Earthbind Avatar
    • Actions
      • Set Avatar = (Triggering unit)
      • Unit Group - Pick every unit in (Random 1 units from Casters) and do (Set Caster1 = (Picked unit))
      • Unit Group - Remove Caster1 from Casters
      • Unit - Add Thunder Clap (for "The King's Hammer" ) to Caster1
      • Unit - Change ownership of Caster1 to (Owner of (Triggering unit)) and Change color
      • Wait 0.01 seconds
      • Unit Group - Pick every unit in (Random 1 units from Casters) and do (Set Caster2 = (Picked unit))
      • Unit Group - Remove Caster2 from Casters
      • Unit - Add Thunder Clap (for "The King's Hammer" ) to Caster2
      • Unit - Change ownership of Caster2 to (Owner of (Triggering unit)) and Change color
      • Wait 0.01 seconds
      • Unit Group - Pick every unit in (Random 1 units from Casters) and do (Set Caster3 = (Picked unit))
      • Unit Group - Remove Caster3 from Casters
      • Unit - Add Thunder Clap (for "The King's Hammer" ) to Caster3
      • Unit - Change ownership of Caster3 to (Owner of (Triggering unit)) and Change color
      • Wait 0.01 seconds
      • Unit Group - Pick every unit in (Random 1 units from Casters) and do (Set Caster4 = (Picked unit))
      • Unit Group - Remove Caster4 from Casters
      • Unit - Add Thunder Clap (for "The King's Hammer" ) to Caster4
      • Unit - Change ownership of Caster4 to (Owner of (Triggering unit)) and Change color
      • Trigger - Turn on Explosions <gen>
      • Wait 60.00 seconds
      • Trigger - Turn off Explosions <gen>
      • Unit Group - Add Caster1 to Casters
      • Unit Group - Add Caster2 to Casters
      • Unit Group - Add Caster3 to Casters
      • Unit Group - Add Caster4 to Casters
      • Unit - Remove Thunder Clap (for "The King's Hammer" ) from Caster1
      • Unit - Remove Thunder Clap (for "The King's Hammer" ) from Caster2
      • Unit - Remove Thunder Clap (for "The King's Hammer" ) from Caster3
      • Unit - Remove Thunder Clap (for "The King's Hammer" ) from Caster4
      • Unit - Change ownership of Caster1 to Neutral Passive and Change color
      • Unit - Change ownership of Caster2 to Neutral Passive and Change color
      • Unit - Change ownership of Caster3 to Neutral Passive and Change color
      • Unit - Change ownership of Caster4 to Neutral Passive and Change color
  • Explosions
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Move Caster1 instantly to ((Position of Avatar) offset by 250.00 towards 0.00 degrees)
      • Unit - Move Caster2 instantly to ((Position of Avatar) offset by 250.00 towards 90.00 degrees)
      • Unit - Move Caster3 instantly to ((Position of Avatar) offset by 250.00 towards 180.00 degrees)
      • Unit - Move Caster4 instantly to ((Position of Avatar) offset by 250.00 towards 270.00 degrees)
      • Custom script: call IssueImmediateOrderBJ( udg_Caster1, "ThunderClap" )
      • Custom script: call IssueImmediateOrderBJ( udg_Caster2, "ThunderClap" )
      • Custom script: call IssueImmediateOrderBJ( udg_Caster3, "ThunderClap" )
      • Custom script: call IssueImmediateOrderBJ( udg_Caster4, "ThunderClap" )
or have i missed some dummy?
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
Ok at first: What exactly isn't working?

2: You forgot to remove Caster1,2,3,4 units from Caster 1,2,3,4. So the second time you use that ability, it will cause effect on the previous random units it picked to be Caster 1,2,3,4, but it will also have an effect on the newly random picked units in Casters.

3: What group is Casters, and at which point does that variable contain units?

and 4: In you last created trigger, you cause the 4 units to go in a + shape away from the source. Is the source 1 exact spot? (If not by default, you need to move those units instantly to a position you desire by trigger) And after 5 seconds, the units move +250 from their locations (+250 from source), which causes the units to end up at +500 from the source location. I'm not sure if that was your intention, but if not: That's a point to fix, by returning them back to the source at the end of the second trigger you posted.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Well firstly telling us what it does would help. You are the author, thus you know more about what it is meant to do than us guessing by looking at a defective code.

Secondly you leak a large number of groups, leaking groups is bad if you want your map to be playable.

Thirdly every 5 seconds you leak 8 locations (points in GUI). Again this is bad if you want your map to be playable.

A leak is when data is put into a computer's memory and only used for one set of opperations. The data then has all its references lost and is left in the computer's memory until the end of the game. This results in slowdowns after a while of playing and can cause some hande array data systems to bug due to blocked up handle IDs.

To stop leaks simply use a few lines of JASS.
 
Status
Not open for further replies.
Top