I have trigger which fires for every of triggering player.
F.e any player can click button when he wants, when its clicked every minute some variable get +1 stars from 0. When it reaches 8 trigger must be stopped.
But I found it can be stopped only for all instances of trigger, how I can stop it individual for player which var reach 8, but same execution for another player which not reach 8 still continue executing?
I only figuring out use 8 triggers and switch on players depends on triggering player.
Just do it in one trigger like it should and run an if then or some type of check; if the variable is less than 8, add 1.
You will need a variable array with a size equal to the number of players. Assign each array dimension to a particular player (making the array size equal to the highest player number + 1 is an easy way to achieve this, i.e. if there's a player 13, make the array size 14.) When the player clicks the button, add 1 to counter_variable[triggering player].
i think he got the variable but what he needs is a condition checking the variable and if its over 8 the trigger should not fire
Yes, you right except trigger should not firing but stop executing for this player. When I fire action "Stop all instances of trigger" he stop it for all players, I need stop it only for individual player. There are arrays of active trigger instances?
Are you using a trigger with "Repeat Forever" or what? In that case do something like "Skip Remaining Actions", or I think "Return" makes a trigger end, or just use a while loop instead.
In any case, posting the triggers helps. Dont worry about anyone stealing your work, most people don't care and anyone who can't make this without having to steal a broken trigger off a thread most likely won't be able to finish the map anyway.
Here is an example of what they mean in trigger form
Globalvariables:Pies=0<integer[14]>Trigger:PieseatencountEvent:AnyplayerusesadialogitemwiththeeventtypeclickedConditions:Pies[Triggeringplayer]<8Actions:ModifyPies[triggeringplayer]:+1Display("you have eaten",text(Pies[triggeringplayer]),"pies")
This trigger will not run for the triggering player if their pie count is over 8.
General-Switch(Actions)dependingon(Triggeringplayer)CasesGeneral-If(P1USER)ActionsTrigger-StopallinstancesofGovermentcorruption1General-If(P2USER)ActionsTrigger-StopallinstancesofGovermentcorruption2General-If(P3USER)ActionsTrigger-StopallinstancesofGovermentcorruption3General-If(P4USER)ActionsTrigger-StopallinstancesofGovermentcorruption4General-If(P5USER)ActionsTrigger-StopallinstancesofGovermentcorruption5General-If(P6USER)ActionsTrigger-StopallinstancesofGovermentcorruption6General-If(P7USER)ActionsTrigger-StopallinstancesofGovermentcorruption7General-If(P8USER)ActionsTrigger-StopallinstancesofGovermentcorruption8DefaultDialog-DisableGoverment_Anarchy_Buttonfor(Playergroup((Triggeringplayer)))UI-Display"Your civilization is now in Anarchy..."for(Playergroup((Triggeringplayer)))toSubtitleareaVariable-SetGovernmets_Form_MonarchyButton_Enabled[(Triggeringplayer)]=FalseVariable-SetGovernmets_Form_Democracy_Button_Enabled[(Triggeringplayer)]=FalseVariable-SetGovernmets_Form_Communism_Button_Enabled[(Triggeringplayer)]=FalseVariable-SetGovermentForm[(Triggeringplayer)]=0Variable-SetAnarchy_Penalty[(Triggeringplayer)]=1Variable-SetGovernment_Income[(Triggeringplayer)]=0Variable-SetFactory_Income_Factor[(Triggeringplayer)]=1Variable-SetGovernment_Corruption_Level[(Triggeringplayer)]=0
problem is first action, it cant be used with triggering player
I dont care about stealing, there only part of it which interesing me
forgot add that Goverment corruption trigger executing while conditions are matched, for ideal always.
I have trigger which fires for every of triggering player.
F.e any player can click button when he wants, when its clicked every minute some variable get +1 stars from 0. When it reaches 8 trigger must be stopped.
But I found it can be stopped only for all instances of trigger, how I can stop it individual for player which var reach 8, but same execution for another player which not reach 8 still continue executing? I only figuring out use 8 triggers and switch on players depends on triggering player.
Just do it in one trigger like it should and run an if then or some type of check; if the variable is less than 8, add 1.
You will need a variable array with a size equal to the number of players. Assign each array dimension to a particular player (making the array size equal to the highest player number + 1 is an easy way to achieve this, i.e. if there's a player 13, make the array size 14.) When the player clicks the button, add 1 to counter_variable[triggering player].
i think he got the variable but what he needs is a condition checking the variable and if its over 8 the trigger should not fire
Yes, you right except trigger should not firing but stop executing for this player. When I fire action "Stop all instances of trigger" he stop it for all players, I need stop it only for individual player. There are arrays of active trigger instances?
I have array of variables.
Are you using a trigger with "Repeat Forever" or what? In that case do something like "Skip Remaining Actions", or I think "Return" makes a trigger end, or just use a while loop instead.
In any case, posting the triggers helps. Dont worry about anyone stealing your work, most people don't care and anyone who can't make this without having to steal a broken trigger off a thread most likely won't be able to finish the map anyway.
@TheAlmaity: Go
I think he just doesn't understand what they are saying.
@Form01: Go
Here is an example of what they mean in trigger form
This trigger will not run for the triggering player if their pie count is over 8.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
problem is first action, it cant be used with triggering player
I dont care about stealing, there only part of it which interesing me
forgot add that Goverment corruption trigger executing while conditions are matched, for ideal always.