Loops in GUI.

tooltiperror

Super Moderator
Reaction score
231
Trigger:
  • Unit Group - Pick every unit in (Units in (Region centered at (Position of (Triggering unit)) with size (200.00, 200.00))) and do (Actions)
    • Loop - Actions
      • Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 20.00 damage of attack type Spells and damage type Normal


Can I loop it every eight seconds, without using the event "Every Eight Seconds"?
 

Seannny

Why GUI when you can Jass?
Reaction score
46
You are telling triggering unit to damage triggering unit. That wont work.

And then no, not with GUI at least. You need to use Jass or use periodic loop.
 

tooltiperror

Super Moderator
Reaction score
231
You are telling triggering unit to damage triggering unit. That wont work.

And then no, not with GUI at least. You need to use Jass or use periodic loop.

Was just an example.

And, okay.
 

kaboo

New Member
Reaction score
45
if it doesnt need to be mui then put that into
Code:
for each integer A 1 to 8 do your action + wait 1 second
 

tooltiperror

Super Moderator
Reaction score
231
if it doesnt need to be mui then put that into
Code:
for each integer A 1 to 8 do your action + wait 1 second

Meh, it has to be MUI.

Would it be quick to fix to then do it in Hashtables, or make an array with a slot per player?
 

kaboo

New Member
Reaction score
45
for this exactly i would use
Code:
events - unit start effect of an ability
conditions - ability being cast equal to your ability
actions
-set targets = units in 200 range from casting unit/targeted point of ability being cast
-for each integer 1 to number of units in "targets" do
  -pick 1 random unit from "targets"
  -create dummy for owner of casting unit at position of picked unit
  -add shadow strike to last created unit
  -order last created unit to shadow strike picked unit
  -add 2 second expiration timer to last created unit
  -remove picked unit from "targets"
you just have to modfiy the shadow strike spell :p
 

tooltiperror

Super Moderator
Reaction score
231
for this exactly i would use
Code:
events - unit start effect of an ability
conditions - ability being cast equal to your ability
actions
-set targets = units in 200 range from casting unit/targeted point of ability being cast
-for each integer 1 to number of units in "targets" do
  -pick 1 random unit from "targets"
  -create dummy for owner of casting unit at position of picked unit
  -add shadow strike to last created unit
  -order last created unit to shadow strike picked unit
  -add 2 second expiration timer to last created unit
  -remove picked unit from "targets"
you just have to modfiy the shadow strike spell :p

But could I do it for all units in a unit group?
 

kaboo

New Member
Reaction score
45
this will cast shadow strike to all units in unit group - units in 200 range from casting unit/targeted point fo ability being cast
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
You should be able to use JASS loops with GUI.
start it with "loop", add "exitwhen VARIABLE == WhatEverValue", and end with endloop.
Anything between loop and endloop will be looped until the exitwhen condition is true.
Exitwhen is easy to use. Prefix globals with "udg_VariableNameHere".
Example: [ljass]exitwhen udg_BOOLEAN == true[/ljass].

If I read the post right, it might help. If not, well, at least you learnt something new.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top