I'm trying to control turn order.
I use 1 macro to start the game - stored on the Lib:token clicked by the GM.This initializes variables on the Lib:token. It scans for connected players and logs that as a list on the Lib:token. It then fires a macro using the macro roll option to roll for turn order.
Code: Select all
[h, macro("rollTurnOrder@Lib:DQ"):outputPlayer]
Code: Select all
[h: processorLink = macroLinkText("processTurnOrderRoll@Lib:DQ", "all", macro.args)]
Code: Select all
[r, macro("startCharSelect@Lib:DQ"):""]
Code: Select all
[r: broadcast( macroLink("", "charSelect@Lib:DQ", "none", outputPlayer), outputPlayer)]
Code: Select all
[h: processorLink = macroLinkText("processCharSelect@Lib:DQ", "all")]
I have screwed up my code somewhere, and when I get to the last macro. Everything stops. Seems like sometimes it works correctly and sometimes it bombs out and stops.
Sorry for the lengthy post, but I am wondering if maybe I am doing things the hard way again, and loosing focus somewhere or something by broadcasting macrolink and passing the "responsibility" of fireing the next macro in line to a the next player. So sometimes the gm fires the macro that would move to the next step in the macro chain, and sometimes its one of the other players. I assume this could cause issues if each player is esentially updating the Lib:token on thier turn.
Should I or is there a "smarter" or "safer" way to be doing this?
Like should some of this be handled through UDF or something?