@Mikali wrote:
For my mod, I need to have a queue of commands that are triggered when the game timer reaches certain values. For instance, I have a
currentGameTimewhich keeps track of the current time, in seconds. I also have a queue such as the following:globalTimeQueue = { {54, "SquadHasArrived(1, 1)",}, {75, "SquadHasArrived(1, 2)",}, {128, "SquadHasArrived(1, 3)",}, }The first number is the time in seconds. The command to execute is stored in a string. In this case one of the commands is
SquadHasArrived(1, 3), where 1 is the player index and 3 is the fleet index. The problem is, I might need to go back and remove the command before it is executed and insert a replacement. Is there a good way to accomplish this? Is there a better structure to the global time queue? Thanks!
Posts: 8
Participants: 5





