HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Integer A's

08-16-2005, 07:22 PM#1
Tim.
Alright I got a pretty basic IntegerA loop here, but for some reason, when the Boolean, SuperActive, is equal to True, both sections of the trigger run. Well, not exactly. It seems to run the part about moving the Ghosts back to thier spawn, but doesn't move Pacman back to his spawn. On top of that, this whole thing worked perfectly until I changed it to arrays.

Help would be nice, because I see no errors.
Quote:
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
-------- Super Pill OFF --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SuperActive[(Integer A)] Equal to False
Then - Actions
Unit Group - Pick every unit in GhostGroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Pill Detected ) Equal to True
Then - Actions
Game - Display to (All players) the text: Pacman Died!
Unit - Pause Pacman[(Integer A)]
Unit Group - Pick every unit in GhostGroup and do (Actions)
Loop - Actions
Unit - Pause (Picked unit)
Unit Group - Pick every unit in GhostGroup and do (Actions)
Loop - Actions
Unit - Hide (Picked unit)
Unit - Move (Picked unit) instantly to (Center of GhostSpawnRed <gen>)
Unit Group - Pick every unit in GhostGroup and do (Actions)
Loop - Actions
Unit - Unhide (Picked unit)
Unit - Unpause (Picked unit)
Unit - Move Pacman[(Integer A)] instantly to (Center of RedPacmanStart <gen>)
Set tempLoc[(Integer A)] = (Position of Pacman[(Integer A)])
Unit - Remove Pacman[(Integer A)] from the game
Unit - Create 1 Pacman for (Player((Integer A))) at tempLoc[(Integer A)] facing 180.00 degrees
Set Pacman[(Integer A)] = (Last created unit)
Unit - Change color of Pacman[(Integer A)] to Yellow
Unit - Unpause Pacman[(Integer A)]
Else - Actions
Do nothing
Else - Actions
-------- Super Pill ON --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SuperActive[(Integer A)] Equal to True
Then - Actions
Unit Group - Pick every unit in GhostGroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Pill Detected ) Equal to True
Then - Actions
Game - Display to (All players) the text: Ghost Died!
Set Score[(Integer A)] = (Score[(Integer A)] + 20)
Unit - Hide (Picked unit)
Else - Actions
Do nothing
Else - Actions
08-16-2005, 07:40 PM#2
HexenLordX
Did you set the Variable Pacman[] in another trigger? And is there only one pacman in the map? If there is, the Pacman variable doesn't need to be an array, just a unit variable.
08-16-2005, 09:55 PM#3
Tim.
There are 12 pacman units in the map, every player has one.

Yes I set the variable to the correct unit elsewhere.
08-17-2005, 05:31 AM#4
EdwardSwolenToe
Make sure no other 'integer a' triggers are running at the same time. They will overlap and cause bugs.
08-17-2005, 09:51 AM#5
Tim.
Nope, this is the only Integer A loop in this trigger.
08-17-2005, 10:59 AM#6
EdwardSwolenToe
or in any trigger
08-17-2005, 09:28 PM#7
oNdizZ
Although Integer A and B are built in globals, it shouldn't have anything to do with if he had more than 1 Integer A loops in his map or not since he aint using any type of wait in his loop.