Integer problems!

I am making a dialog voting system. People have to vote for whatever difficulty they see fit. My problem is, what if there is a tie?
If there is a tie I rerun the dialog, as to change some votes around. Once there are no ties. The game will start.
Here is my trigger:

Code:
For each (Integer A) from 1 to 5, do (Actions)
????Loop - Actions
????????If (All Conditions are True) then do (Then Actions) else do (Else Actions)
????????????If - Conditions
????????????????DifficultyINT[(Integer A)] Equal to (Integer A)
????????????Then - Actions
????????????????Trigger - Run Difficulty <gen> (checking conditions)
????????????????Skip remaining actions
????????????Else - Actions
????????????????Do nothing

Only problem is if all of them vote for the 'easy' difficulty the trigger will count it as a tie, with itself. (It will actually count ANYTHING as a tie, because everythng will be tieing with each other)
This problem is fixed after everyone votes twice, whether or not there is a tie, (offical tie)

So my question is, how do I make it that the Interger A doesn't make it so it ties with itself.
I beleive it's the Integer itself but if I were to do it the way I know, it would take forever to do it.
I would have to go
DifficultyINT[1] Equal to DifficultyINT[2] - rerun trigger
DifficultyINT[1] Equal to DifficultyINT[3] - rerun trigger
DifficultyINT[1] Equal to DifficultyINT[4] - rerun trigger
......
DifficultyINT[2] Equal to DifficultyINT[3] - rerun trigger
DifficultyINT[2] Equal to DifficultyINT[4] - rerun trigger
...ect. This is unnessicary space in my opionion. Please if you have a fats and effictient way. Tell me.
(There are other tirggers working with this one, but this is the one causing the trouble)

Any help appriciated.
 
Werbung:

Undead_Lives

New Member
I'm not exactly getting what this trigger does, maybe if you post the other triggers it could help...or maybe the rest of the trigger cause this looks like a fragment of a trigger.
But if you are saying that DifficultyINT[(Integer A)] Equal to (Integer A) it seems that it will ALWAYS equal Integer A...
 
Alright, I KNOW the trigger is wrong. What I want is someone to help me fix it. Also this is a PART of a trigger but the rest of the trigger does NOT effect it.
This part only sorts out ties in votes. (Well it doesn't that's why I need help.)
The rest just decides the difficulty the game should be (Noob, Easy, Normal, Hard, Pro)
The other triggers do NOT effect this trigger whatsoever.
The promlem lies here:
Code:
For each (Integer A) from 1 to 5, do (Actions)
????Loop - Actions
????????If (All Conditions are True) then do (Then Actions) else do (Else Actions)
????????????If - Conditions
????????????????DifficultyINT[(Integer A)] Equal to (Integer A)

PS. But if you want/need the triggers that badly, just tell me :p
 

Xeridanus

New Member
Code:
??For each (Integer A) from 1 to 5, do (Actions)
????Loop - Actions
????????For each (Integer B) from ((Integer A) + 1) to 5, do (Actions)
????????????Loop - Actions
????????????????DifficultyINT[Integer A] Equal to DifficultyINT[Integer B] - rerun trigger

this won't double up on ones that have already been checked.
NB: ((Integer A) + 1) is the key mechanism.
 
Code:
??For each (Integer A) from 1 to 5, do (Actions)
????Loop - Actions
????????For each (Integer B) from ((Integer A) + 1) to 5, do (Actions)
????????????Loop - Actions
????????????????DifficultyINT[Integer A] Equal to DifficultyINT[Integer B] - rerun trigger

this won't double up on ones that have already been checked.
NB: ((Integer A) + 1) is the key mechanism.
[/b]
Ahh thsanks you, I will do so and see if that works, thanks.

@Undead, I did - and if you rea dmine I told you that I knew the tirgger was wrong, so go figure :p


Can't give rep to you Xer, I gave you too much lately :(
EDIT: It DOES work ;) Thanks again,
 
Werbung:
Top