HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

wtf? world edit does not know scat!

12-02-2004, 05:32 AM#1
|)@rk-Revenant
I made a map similar to a footman wars, but better. I made a simple trigger to remove every unit from every player that is not at the time playing, and remove that player from the player group "alive". I created this trigger:

Code:
Events:
Elapsed game time is 10 seconds.
Conditions:
<none>
Events:
Pick every player matching if matching player's slot status not equal to is playing, do actions.
     -Pick every unit owned by picked player and remove picked unit.
     -Remove picked player from "alive".
This is probably the simplest trigger in the entire map, but it does not work. It is likely to be an internal error built into the script of Wc3. Until someone says otherwise, that is what I believe the problem is.
12-02-2004, 04:38 PM#2
Captain Griffen
Try checking every player individually, or using a loop for all players. Those triggers are very iffy...had problems with them before.
12-02-2004, 09:47 PM#3
iNfraNe
you cannot use pick every unit inside pick every player loop. Didnt check, but, I guess they use same variables. It would end up like a integer a loop inside an integer a loop...
12-02-2004, 09:58 PM#4
Vexorian
Quote:
Originally Posted by toot
you cannot use pick every unit inside pick every player loop. Didnt check, but, I guess they use same variables. It would end up like a integer a loop inside an integer a loop...
they don't use variables, but I think it might be possible, replace the pick every -- with a for loop , it will also fix a force memory leak
12-03-2004, 10:33 AM#5
iNfraNe
Quote:
Originally Posted by Lord Vexorian
they don't use variables, but I think it might be possible, replace the pick every -- with a for loop , it will also fix a force memory leak
if they dont use variables, then how can they loop? and yes, ofcourse a for loop (which isnt really a for loop anyway -.-) would work...
12-03-2004, 12:02 PM#6
Guest
Certain loops at certain points abort or don't execute at all for no reason. Some time a for loop executes only once before aborting. Some time it executes 13 times before aborting (I am confused, yay)

We just have to adjust our method to please Warcraft XD
12-03-2004, 12:23 PM#7
iNfraNe
if you have a problem with big loops stopping unfinished, just put the actions of the loop inside another trigger. That will solve the problem
12-03-2004, 03:21 PM#8
Vexorian
Quote:
Originally Posted by toot
if they dont use variables, then how can they loop? and yes, ofcourse a for loop (which isnt really a for loop anyway -.-) would work...
They are loops but they are native enumerations of the players in the force or the units in the force it is way easier to understand that in jass, but I will say that it is an internal function that asks for the force or the unit group then keeps executing a function you gave to it as argument.
12-03-2004, 03:57 PM#9
iNfraNe
right, but doesnt GetEnumUnit() and GetEnumPlayer() use some kind of variable to check the "number" of the unit it is at?

I mean, the function GetEnumUnit() just returns some variable of a unit iguess, but the unit group loop has to set the variable to a value, and it has to know at which point in the group it is right?