HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spell that freezes the game.

04-11-2006, 04:10 PM#1
Fulla
Trigger:
For each (Integer A) from 1 to 6, do (Actions)
Collapse Loop - Actions
Unit - Create 1 Flamebreak for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by 200.00 towards Ability_Red_Cracktheearth degrees) facing Default building facing (270.0) degrees
Set Ability_Red_Cracktheearth = (Ability_Red_Cracktheearth + 60.00)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)

Why does this seem to make an infinite amount of units?
Shoud only make 6? in a cricular formation.
04-11-2006, 04:22 PM#2
PitzerMike
It might happen if the event for your trigger is 'Unit enters rect' or something similar.
04-11-2006, 04:26 PM#3
Thunder_Eye
I assume the event is "begins casting an ability" or something like that as it refers to "Owner of Casting Unit"
04-11-2006, 07:21 PM#4
mmx2000
Yes, there is nothing wrong with that code there.
A For Each Int A loop in GUI will (should) never create an infinite loop.
It must be something involving the event and/or the timer, I'd guess...
04-11-2006, 07:43 PM#5
emjlr3
posting the whole script may be helpful in finding your problem
04-12-2006, 06:42 AM#6
RaeVanMorlock
Quote:
Originally Posted by Fulla
Trigger:
For each (Integer A) from 1 to 6, do (Actions)
Collapse Loop - Actions
Unit - Create 1 Flamebreak for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by 200.00 towards Ability_Red_Cracktheearth degrees) facing Default building facing (270.0) degrees
Set Ability_Red_Cracktheearth = (Ability_Red_Cracktheearth + 60.00)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)

Why does this seem to make an infinite amount of units?
Shoud only make 6? in a cricular formation.


Two things:
1) Post the entire trigger that you're having a problem with.
2) Read up on memory leaks... you're creating a point and not destroying it.
04-12-2006, 08:17 AM#7
Fulla
thx guys for response.

I found the problem it was unrelated to that trigger code.
All my fault.

Also, yes ill look into removing leaks