HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Does GUI work like this?

07-12-2007, 02:14 PM#1
rednek
Hi, I have little GUI problem now. I want to pick every unit in unit group and move every of them few meters backwards. Well, it's something like throw away every units near hero. But not exactly.
I have loooong loooong GUI triggers there, but it does not work.

Well, I know, it's ugly to want from you find bugs instead me, but I don't want to. I just want to know, if GUI work like this. If is that part of trigger what I was write below exactly, then I must find bug somewhere in that long trigger. But I still can't find it, and I have feeling that is something about this part...

Trigger:
Set StInt = 0
Collapse Unit Group - Pick every unit in StGrup and do (Actions)
Collapse Loop - Actions
Set StUnitLet[StInt] = (Picked unit)
Set StTempLetPoint[StInt] = ((Position of StUnitLet[StInt]) offset by 100.00 towards ((Angle from (Position of StUnitLet[StInt]) to StTempPointKvetinka) - 180.00) degrees)
Unit - Move StUnitLet[StInt] instantly to StTempLetPoint[StInt]
Set StInt = (StInt + 1)

(explanation of this part of trigger: I want to pick every unit in Unit Group (Variable StGroup) and give variable StUnitLet to that unit. Also variable StUnitLet has array, and value of that array is variable StInt. When is unit picked, I want to move it to point with variable StTempLetPoint. This point variable has also array, and value of that array is StInt too. After that, I will rise value of StInt for 1 point :P So every unit should have array value increased by one)
07-12-2007, 05:03 PM#2
TheSecretArts
Add a Display Text Function in there to test whether the loop is actually running. And put in a bunch of more display functions displaying variable values that you can ananlyze for problems. It is dead useful to put that kinda stuff in.
07-12-2007, 05:43 PM#3
maximilianx
that is..an odd way of making a spell.

so if you're trying to make all units poof away from the hero.. heres a trigger

Trigger:
Collapse Events
Unit - Unit starts the effect of an ability
Collapse Conditions
Ability being cast equal to (your ability)
Collapse Actions
Unit group - Pick every unit within 400 range of (your hero) and move (picked unit) 100 towards (angle from triggering unit to picked unit)

unless i misunderstood what it is you wanted..this should work just fine.
07-12-2007, 05:59 PM#4
rednek
TheSecretars: Great idea man, I can't belive that I forgot about this ^^ thanks
maximilianx: well, it's not that easy, that trigger is more completion... (mean, I can't pick every unit near hero and I can't avoid it with conditions...)

EDITED: well, loop works well, so I will have pretty good time with finding that bug in triggers above :D
one more thanks, ^^