HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A REALLY bizzare bug

11-16-2003, 08:26 AM#1
Mast-of-fish
i have THIS trigger in my map.
But i have a REALLY weird problem with it.
The INTEger A loop, where it cycles thru "town wells" NEVER gets to 2
i have checked absoulutely everything, the action is working fine, the trigger works perfectly if your in townwells[1], but it REFUSES to get to number 2......
does any1 have a clue as to what this bizzare behaviour is caused by?
Is there some sort of weird trigger execution limit??
Ive left in the debugging stuff so you can see just how exhaustively ive been checking it over




CaptureTown
Events
Unit - A unit Uses an item
Conditions
((Owner of (Hero manipulating item)) is in Playerteam[1]) Equal to True
(Item-type of (Item being manipulated)) Equal to Holy Water
Actions
Game - Display to Player 1 (Red), at offset (0.00, 0.00) the text: 0
Item - Remove (Item being manipulated)
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
If ((Integer A) Equal to 1) then do (Game - Display to Player 1 (Red), at offset (0.00, 0.00) the text: 92) else do (Do nothing)
If ((Integer A) Equal to 2) then do (Game - Display to Player 1 (Red), at offset (0.00, 0.00) the text: 67) else do (Do nothing)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TownWells[(Integer A)] contains (Hero manipulating item)) Equal to True
Then - Actions
Game - Display to Player 1 (Red), at offset (0.00, 0.00) the text: 1
Special Effect - Create the illusion of Abolish Magic with that spell's Caster model attached to (Hero manipulating item) on it's overhead
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TownOwnedBy[(Integer A)] Equal to (Team number of (Owner of (Hero manipulating item)))
Then - Actions
Game - Display to (Triggering player), at offset (0.00, 0.00) for 8.00 seconds the text: This town already b...
Hero - Create Holy Water and give it to (Hero manipulating item)
Game - Display to Player 1 (Red), at offset (0.00, 0.00) the text: 2
Skip remaining actions
Else - Actions
Game - Display to (Triggering player), at offset (0.00, 0.00) for 8.00 seconds the text: Wow
Game - Display to Player 1 (Red), at offset (0.00, 0.00) the text: 3
Sorry if its hard to understand.
11-16-2003, 08:37 AM#2
The_Inquisitor3
the LOOP of actions its allways a problem for me... because, if u use LOOP in cinematics will be a disaster... the "wait X time" will cause errors in the loop, in cinematic the camara actions and stuffs stop working when the "wait" comes... maybe u got the same problem. remove the trigger from the loop and put them in the normal line.
11-16-2003, 08:42 AM#3
AllPainful
I have never had a problem with loops in my map...

There are only 3 things I can see that might be the problem.

1. Some of your items are "Triggering Player"....
2. Perhaps you didn't set the TownWells[2] and up to something in your init trigger (You should set additional array indexes variables in an init trigger..)?
3. Some of the things aren't in the loop (which is impossible for me to tell whether they are or arent because you didn't put the trigger between [code] tags so I can't see the indents...)


I have worked with loops and regions stored in arrays before. Never had a problem like this.

Oh yeah, and in the "THE HEROES IS HERE" actions (i hope you know what I mean by that...), you should put "Skip Remaining actions" so that if the hero is in region 1, it doesn't look at the other 11 regions anyway.
11-16-2003, 08:42 PM#4
Vexorian
Ahh yes , and remember that integer A , and Integer B are in fact, global variables so it is better to use the for each (integer variable ) action thingy and have an unique variable for each loop
11-17-2003, 04:32 AM#5
Mast-of-fish
hmmm thx for the attempted help.....
I think im just gonna have to do it a different way or something