If I were to set a global variable to pass onto a trigger, that runs the custom action using the global variable, would this cause any problems if 2 players cause the trigger to run nearly at the same exact time? For example:
Trigger 1: A player uses any dialog item
Set global variable "TempPlayer" = TriggeringPlayer()
Run Trigger "Trigger 2"
Trigger 2: No events
Run Custom Action "Action(gv_TempPlayer)"
Would this, essentially allow me to pass a global variable from one trigger to another? The concept behind this setup is to temporarily set the global variable to the player and quickly toss it to a custom action so that it become local. The only problem I see in this is if that if two player's use a dialog at the same exact time. Would it be a problem, or does it run fast enough not to worry about it?
EDIT: And, if I decide to use "Wait for Trigger to execute and wait for it to complete" will it slow down the process, if players are simultaneously clicking dialogs at a fast pace?
Ok, well it's almost immediately, because I run the trigger first, and the first and only action is a custom action that passes the global to the parameter. No problems, right? Sorry, just double checking.
Rollback Post to RevisionRollBack
Project Rise of Nigma
To post a comment, please login or register a new account.
If I were to set a global variable to pass onto a trigger, that runs the custom action using the global variable, would this cause any problems if 2 players cause the trigger to run nearly at the same exact time? For example:
Trigger 1: A player uses any dialog item
Set global variable "TempPlayer" = TriggeringPlayer()
Run Trigger "Trigger 2"
Trigger 2: No events
Run Custom Action "Action(gv_TempPlayer)"
Would this, essentially allow me to pass a global variable from one trigger to another? The concept behind this setup is to temporarily set the global variable to the player and quickly toss it to a custom action so that it become local. The only problem I see in this is if that if two player's use a dialog at the same exact time. Would it be a problem, or does it run fast enough not to worry about it?
EDIT: And, if I decide to use "Wait for Trigger to execute and wait for it to complete" will it slow down the process, if players are simultaneously clicking dialogs at a fast pace?
It should work fine as long as you offload the temp global to a local immediately. You don't need to wait for it to execute.
@LosTacos: Go
Ok, well it's almost immediately, because I run the trigger first, and the first and only action is a custom action that passes the global to the parameter. No problems, right? Sorry, just double checking.