HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Loops Going Crazy

08-21-2005, 05:48 PM#1
Tim.
Alright below is a group of Integer A loops. At the top of the trigger is 'For Each (Integer A) from 1 to 12 do actions.' Inside the loop there are several checks that run. They check for Buffs and Booleans and then carry out actions. There are no waits anywhere in the trigger. This is the only Integer A trigger in the entire map. All of its functions work just fine except the ones below.

It seems that if 'SuperInactive' is FALSE then instead of only the Picked unit being hidden and points being added, the Ghosts are all returned to the spawn, yet Pacman continues moving. Its as iff it runs part of each section of the trigger instead of only the one part.

A little help would be much apreciated.

Quote:
-------- Super Pills --------
Unit Group - Pick every unit in SuperPills[(Integer A)] 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
Unit - Hide (Picked unit)
Set PillRed = (PillRed + 20)
Set SuperInactive[(Integer A)] = False
Countdown Timer - Start SuperActiveTimer[(Integer A)] as a One-shot timer that will expire in 10.00 seconds
Unit Group - Pick every unit in GhostGroup and do (Actions)
Loop - Actions
Animation - Change (Picked unit)'s vertex coloring to (0.00%, 0.00%, 100.00%) with 0.00% transparency
Else - Actions
Do nothing

-------- Ghost > Pacman --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SuperInactive[(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
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
Else - Actions

-------- Ghost < Pacman --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SuperInactive[(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
Set PillRed = (PillRed + 10)
Unit - Hide (Picked unit)
Else - Actions
Else - Actions