HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Repeating trigger driving me crazy! Help!

07-12-2003, 06:30 AM#1
KrEmAyTu91
Okay... this is really driving me crazy, I've been longing to figure this out for a while. I have a hero arena... and the win game trigger seems to repeat itself over and over again... sometimes at random amounts at a time... okay, so first thing I make it do is END (THIS TRIGGER) before I do anything else... I also see these problems on other hero arenas, where it spams: Team X wins! over and over again... before the victory trigger kicks in... somebody show me what I am doing wrong... Okay this is how my trigger goes:

Events: Every 4 seconds of the game

Conditions: Kills(1) Greater than or equal to MaxTeamKills

Actions:
Turn off this trigger
Unit - move heroes instantly to victory trigger
Game text message: Team 1 is the winner
Wait 5 game seconds
Run Team 1 win trigger (ignoring conditions)

Team 1 win trigger goes like this:

Events: none
COnditions: none
Actions: Pick every player in Team1 and do (Game- Victory for picked player)
Pick every player in Team2,3,and4 and do (Game- Defeat for picked player)

So what the hell is making it repeat?!?!?! My god... It's driving me nuts! I will seriously give you my soul and worship anyone who can help me on this one! I have gone through triggers 10 times more complex with problems that I can solve but this has me stumped!
07-12-2003, 06:40 AM#2
Thunder-Hunter
ehh maybe cause "End This" is before effects of trigger? I dunno just skimmed over ti and that looks like a problem
07-12-2003, 07:45 AM#3
Zoi
Just made a simulation of this.

E: Time - Every 1.00 seconds of game time

A:
Set x = (x + 1)
Game - Display to (All players) the text: (String(x))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
x Greater than or equal to 30
Then - Actions
Trigger - Turn off sample trigger <gen>
Wait 5.00 game-time seconds
Game - Victory Player 1 (Red) (Show dialogs, Show scores)
Else - Actions
Do nothing

Every second x goes up by one and it displays x on the screen.
After x reaches 30, it stopped counting, and 5 seconds later... VICTORY!
07-12-2003, 06:25 PM#4
KrEmAyTu91
Okay, I have no idea how to incorperate that into my trigger... What type of variable is X? What is this:

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
x Greater than or equal to 30

Okay... The thing is... the end trigger has a small cutscene where it changes the camera angle twice, and zooms in on a certain area... the thing repeats it so many times, it looks like a bad rap music video....

Are you suggesting that I add a counter or something? and force it to countdown to 30 once someone reaches the max kill limit? Okay, how about Skyfury's hero arena... my ending trigger was intentionally supposed to be similar to his... a small cutscene.. and victory.... Why does mine repeat?! If anyone really wants to help please leave your email adress and ill try to send my map to you to take a look at...
07-12-2003, 08:03 PM#5
DragonBlade
the wait slows down the ending action so thats why its repeating. Why is the event every 4 seconds? if your map based on most kills during time limit, then put a countdown timer event.
07-12-2003, 08:21 PM#6
KrEmAyTu91
Even if I remove the wait this still happens... I have tried every thing... I even tried splitting the trigger up into 3 seperate triggers... I just recently added the every 4 seconds of gametime just to try it out... Originally... it had no event at all and it worked the same... I even tried lowering it to every 1 second of game time.

There is no time limit on my map... So that is why I dont put a countdown timer event...

Anways... heres my map
07-12-2003, 08:48 PM#7
DragonBlade
So how you win?
07-12-2003, 09:02 PM#8
KrEmAyTu91
If you wanna test out how to win... just simple start the game without any opponents on single player... and it should automatically win when it detects there are no opponents.

If you don't know that already, then I don't think you can help...
07-13-2003, 02:24 AM#9
Zoi
READ MY NEXT POST --- I FOUND YOUR PROBLEM

The trigger I set up was simply a simulation. I made it to check if the trigger was actually being turned off or not. In my trigger, it was indeed turned off.

x represented kills.

i just made it so it would count up to 30, then wait 5 seconds, then victory.

I think the problem is you using

Trigger - Turn Off (This Trigger)
use:
Trigger - Turn Off (select the trigger from the pulldown menu, don't use the event response)

Also try doing it like I did. Just in one if/then/else with your conditions in there instead of in the standard spot between Events and Actions. On a side note, I also would stay away from using array comparisons in the Conditions field. You would have to write a whole new trigger for each array(number).

I'm gonna check out your map and see what I can't do. I know I'm not the best at explaining things. I know why they work most of the time, but I just can't explain it.
07-13-2003, 03:15 AM#10
Zoi
OK I have found your problem.
It lies not in <Team 1 Win Game> but in another trigger altogether

Faulty Trigger:
Player Quits
Events
Time - Every 5.00 seconds of game time
Conditions
Actions
Set bTeam1isPlaying = False
Player Group - Pick every player in Team1 and do (If (((Picked player) slot status) Not equal to Has left the game) then do (Set bTeam1isPlaying = True) else do (Do nothing))
Set bTeam2IsPLaying = False
Player Group - Pick every player in Team2 and do (If (((Picked player) slot status) Not equal to Has left the game) then do (Set bTeam2IsPLaying = True) else do (Do nothing))
Set bTeam3isPlaying = False
Player Group - Pick every player in Team3 and do (If (((Picked player) slot status) Not equal to Has left the game) then do (Set bTeam3isPlaying = True) else do (Do nothing))
Set bTeam4isPlaying = False
Player Group - Pick every player in Team4 and do (If (((Picked player) slot status) Not equal to Has left the game) then do (Set bTeam4isPlaying = True) else do (Do nothing))
If ((bTeam2IsPLaying Equal to False) and ((bTeam3isPlaying Equal to False) and (bTeam4isPlaying Equal to False))) then do (Trigger - Run Team 1 Win Game <gen> (ignoring conditions)) else do (Do nothing)
If ((bTeam1isPlaying Equal to False) and ((bTeam3isPlaying Equal to False) and (bTeam4isPlaying Equal to False))) then do (Trigger - Run Team 2 Win Game <gen> (ignoring conditions)) else do (Do nothing)
If ((bTeam2IsPLaying Equal to False) and ((bTeam1isPlaying Equal to False) and (bTeam4isPlaying Equal to False))) then do (Trigger - Run Team 3 Win Game <gen> (ignoring conditions)) else do (Do nothing)
If ((bTeam2IsPLaying Equal to False) and ((bTeam3isPlaying Equal to False) and (bTeam1isPlaying Equal to False))) then do (Trigger - Run Team 4 Win Game <gen> (ignoring conditions)) else do (Do nothing)



Look at the 2 lines in bold closely.
Basically you're telling the game to run <Team 1 Win Game> every 5 seconds. There's your problem.

I suggest rewriting this whole trigger using "If then Else - Multiple Actions" and have it disable this trigger while it runs the <Team X Win Game> triggers when it gets a condition match.

That should fix your problem.

PS. I found this by adding a couple lines of debugging code to the <Team X Win Game> trigger, which would have made it impossible to fire on its own after the first run. I then opened the Object Manager, and looked for other triggers using [Event - Periodic Event] until I found this one telling it to run your win trigger.
07-13-2003, 10:07 PM#11
KrEmAyTu91
Wow thankyou very much, Zoi. My problems was fixed immedietely when I just ordered it to turn off the player quits trigger at the very beginning of the win game trigger...

Very few people would have wasted their time helping me, so thanx :D

Finally, I can stop going insane every time my game ends...
07-14-2003, 05:48 AM#12
Zoi
Glad to be of help. To be honest, it was bothering me, because your triggers looked fine from what you posted. Once I got in the map, I just couldn't figure it out. I had to see what was wrong. It also helps me prevent this happening to me, too =)

Good luck with the rest of the map.

Zoi