• 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] made eclipse (luna's ult from dota) but doesnt work

Status
Not open for further replies.
Level 3
Joined
Jun 23, 2007
Messages
32
hey im trying to make eclipse, which is a slam spell which then calls down a lucent beem (basicaly dmg and a .1 second stun) to a random nearby enemy unit. It calls down 8 beams with about .5 seconds between each beam. the caster can run around for a few seconds and the beams will only be called down to hit the units it is by, ie the beams do not just hit random units at the location of casting. so here is my trigger (trying to stay in GUI). it doesnt seem to be multi-insticable and it doesnt always seem to hit 8 times.

  • eclipse
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to eclipse (Neutral Hostile 1)
    • Actions
      • Custom script: local unit udg_unit
      • Set unit = (Triggering unit)
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Wait 0.50 seconds
          • Set point = (Position of unit)
          • Set group = (Units within 400.00 of point)
          • Unit Group - Pick every unit in group and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
                  • (Unit-type of (Picked unit)) Not equal to dummy
                  • (Unit-type of (Picked unit)) Not equal to scatter shot dum
                  • (Unit-type of (Picked unit)) Not equal to chilling armor dum
                  • (Unit-type of (Picked unit)) Not equal to tinker bomb dum
                  • (Unit-type of (Picked unit)) Not equal to web
                  • (Unit-type of (Picked unit)) Not equal to web dum
                  • (Unit-type of (Picked unit)) Not equal to march of the machines dum
                  • (Unit-type of (Picked unit)) Not equal to machine def lvl 1 dum
                • Then - Actions
                  • Unit Group - Add (Picked unit) to group2
                • Else - Actions
          • Unit - Create 1 dummy for (Owner of (Triggering unit)) at point facing Default building facing degrees
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Add eclipse dum to (Last created unit)
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from group2)
      • Custom script: call RemoveLocation(udg_point)
      • Custom script: call DestroyGroup(udg_group2)
      • Custom script: call DestroyGroup(udg_group)
 
Level 3
Joined
Aug 15, 2007
Messages
67
Maybe I'm missing somthing but all I see is you pick alot of units and then storm bolt one random unit in group2. Did you leave stuff out?
 
Level 3
Joined
Jun 23, 2007
Messages
32
waht it does is creates a group consistiing of units around the caster, then checks if the units in group are enemies, non dummies etc, then picks one at random for a dummy to cast storm bolt (lucent beam ) on then waits .5 secs, then does it again , supposedly, 8 times. does anyone see why it wont work
 
Level 3
Joined
Aug 15, 2007
Messages
67
How do you know it will do it 8 times? It looks like it will just do it once then it stops by the trigger.
 
Level 12
Joined
Aug 18, 2006
Messages
1,193
enhancing GUI triggers with locals has never worked for me, becouse my triggers seem to get cut in half whenever i use them

however, i might do have a solusion for you. Instead of having a Loop, why dont you try and create a Dummy, and make the Loop Actions when the Dummy unit dies?

this way, it can be MUI as well
 
Level 6
Joined
Aug 24, 2007
Messages
173
I may be wrong, but I think that when you destroy a group using "Custom script: call DestroyGroup(udg_group)" that it literally destroys it, and it cant be referenced again. i might be thinking of something else.


Ohh, "integer A" does not run the functions eight times. right now your integer A function isn't doing anything. I would repeat the trigger, then have an execution count function stop it when it reaches 8. also, you could use 8 different triggers that run the next one after each one.
 
Level 18
Joined
May 27, 2007
Messages
1,689
yes it will, i have used in numerous times, it allows you to run multiple functions in a loop, and set different things to the number of times it has run by referencing "Integer A" like you could set an Integer Variable[Index] to display Integer Variable[Integer A] and it will give you which loop it is on like for example Integer Variable [4]
 
Level 6
Joined
Aug 24, 2007
Messages
173
I know. using For each Integer A from 1-10, for instance, in "Player - Give player [Integer A] 100 gold" would give player 1-10 100 gold each. it does not run the function 10 times, it just replaces [Integer A] with 1-10.

If by a chance i'm wrong, then i still go by my other statement. have you tried not clearing the variables?
 
Level 6
Joined
Feb 2, 2005
Messages
205
Use the
  • Custom script: set bj_wantDestroyGroup = true
instead of the manual destory stuff. Place it in front of your Groups. Or if those Groups are used in more than one Trigger don't destroy it, set it to null. (set udg_group = null)

@Turtels on the loop Topic
I think it repeats the Action 8 Times, add a Game Message in a Loop and it will show up 8 times, so it repeats it [Interger A] is the Index of the Loop which will increase or decrease (only Jass) so you can refer with help of this to different Player/Array-Index Numbers.
 
Status
Not open for further replies.
Top