Hi all,
I'm finding myself caught up in all sorts of mathematic problems lately, something I'm not the greatest at solving on my own. I want to have a trigger that will go something like this:
Event triggered by "Player (X) presses a button for a dialog box"
(The dialog box will have multiple options, let's say there's 4 for this particular one.)
If the player picks option 1, it will add +1 to a variable with the 1st array, eg.
Set PickedOption[1] = PickedOption[1] +1
If they pick #2, it will do the same thing to the 2nd array of "PickedOption".
What I need help with is how to do this using a temp player variable, something that every time the trigger is fired it will set the player that activated it as the current player. So it would do the above mentioned functions, but each player would have their own counter and they are called upon based off of who most recently pressed a button/fired the trigger.
So, if player 1 has PickedOption[1] at 5, and player 2 gets a +1 counter to PickedOption[1] it will only affect it for that player, and red's counter will remain at 5.
The reason this is necessary to do with a universal trigger, and not have a different trigger for each player, is because I'm planning on having 21 questions and 38 options per question (funnelled into say, 4 choices). I would need to set around 800 variables individually x5, as my original intention was to have 5 separate variables - Player1Options, Player2options, etc. If I screw one up I would have a hard time noticing that there's something wrong for that specific player having to search through 5 long, tedious triggers.
I hope I'm explaining this right, if someone needs me to clarify I would be happy to do so.
I'm finding myself caught up in all sorts of mathematic problems lately, something I'm not the greatest at solving on my own. I want to have a trigger that will go something like this:
Event triggered by "Player (X) presses a button for a dialog box"
(The dialog box will have multiple options, let's say there's 4 for this particular one.)
If the player picks option 1, it will add +1 to a variable with the 1st array, eg.
Set PickedOption[1] = PickedOption[1] +1
If they pick #2, it will do the same thing to the 2nd array of "PickedOption".
What I need help with is how to do this using a temp player variable, something that every time the trigger is fired it will set the player that activated it as the current player. So it would do the above mentioned functions, but each player would have their own counter and they are called upon based off of who most recently pressed a button/fired the trigger.
So, if player 1 has PickedOption[1] at 5, and player 2 gets a +1 counter to PickedOption[1] it will only affect it for that player, and red's counter will remain at 5.
The reason this is necessary to do with a universal trigger, and not have a different trigger for each player, is because I'm planning on having 21 questions and 38 options per question (funnelled into say, 4 choices). I would need to set around 800 variables individually x5, as my original intention was to have 5 separate variables - Player1Options, Player2options, etc. If I screw one up I would have a hard time noticing that there's something wrong for that specific player having to search through 5 long, tedious triggers.
I hope I'm explaining this right, if someone needs me to clarify I would be happy to do so.