HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Removing Effects

11-23-2002, 05:34 PM#1
Electromancer
I'm making a game to were you can make effects on different units, but when the game master turns off the effects, they all dissapear. I had a replace all units trigger, but this causes some bad lag problems. Is there a way to remove all the effects without having to replace the units. Im ok with jass, but i dont know what that would be if its in jass. Any useful replies would really help. Thanks.
11-23-2002, 07:07 PM#2
The_Cyberdemon1
What kind of effects?
11-23-2002, 07:12 PM#3
weaaddar
you must destroy the special effects, keep track of each special effect created via an array then destroy them when you have no need of it.
11-23-2002, 08:04 PM#4
Electromancer
Thanks, i forgot you could keep an array.
11-23-2002, 11:32 PM#5
Electromancer
One last thing, when doing arrays can it keep mutliple things on one number? I set it to -100000 to 100000 just in case it cant, but i need to know because i think numbers that big can lag the game.
11-24-2002, 12:25 AM#6
MicrosoftXP
double subscripted arrays? no.

But you can fake it if your data invovles intergers
Ex
index 1 range: 1-20
index 2 range: 1-10
variable[(index1 * 10) + index2]

or something similar
11-24-2002, 02:35 AM#7
dataangel
No you can't put 2 things in one number. And I don't think you can use negatives either.
11-24-2002, 02:35 AM#8
dataangel
Also, if you mean effects like slow poison, web, etc. use the remove all buffs ability (I think it's in the units section).
11-24-2002, 05:43 PM#9
Electromancer
Nope, they are special effects that are made through the "Special Effect - Create Special Effect On Unit" trigger. And i dont need that many numbers anyway, because im sure that 10000 or so will be enuff since the map would probably get laggy around 1000 effects at one time. Its an rp map that im helping my friend on, so the effects wont be gone or wont need to be gone in like 5 minutes. And one last question, i thought that i would be able to just destroy all effects, but it wants an index on this one too. Any way to destroy them all at one time without having to make 10000 triggers?
11-24-2002, 09:17 PM#10
Unindel
use a loop
11-24-2002, 09:23 PM#11
weaaddar
yeah from 1-10000 or whatever your max is :)
11-25-2002, 01:53 AM#12
Electromancer
Sorry but ive never dealt with arrays before, so i have no idea how i would do a loop.
11-25-2002, 05:16 AM#13
Unindel
for every integer a from 1 to 10000 do (destroy special effect (special effect var[Integer A])
11-25-2002, 06:40 AM#14
Electromancer
thanks, that helps alot.