-
October 27th, 2019, 20:20 #1
Problems synchronising a label cycler field to the combat tracker.
In the One Ring, the combat stance of a character determines the initiative order. I've implemented this in the combat tracker using a label cycler. For the latest version of the ruleset, I had the idea of placing a similar label cycler (with the same values) on the character sheet so that the player could control the stance rather relying on the GM to change the stances. Unfortunately, I've not managed to get the link to synchronise to the tracker.
Debug output would indicate that the change to the field on the character sheet is being picked up by the code, but not making through to the cycler on the combat tracker.
s'DEBUG : onLinkUpdated(): sLink/bLocked/value: ' | s'charsheet.id-00002.defaultstance' | bFALSE | s'Open'
s'DEBUG : onUpdateDisplay(): sLink: ' | s'charsheet.id-00002.defaultstance' | s'Fwd'
Anyone tried this or something similar?Using Ultimate license - that means anyone can play.
Valarian's Fantasy Grounds Rulesets
-
October 28th, 2019, 01:22 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,561
Maybe you can try implementing the "stance" as a hidden stringfield which is linked like other PC fields, and then attach the cycler to that field.
Regards,
JPG
-
October 28th, 2019, 11:58 #3
I've managed to get the label cycler synchronisation to work by moving some of the update code into the onLinkUpdated function instead of calling the update function on the cycler itself.
Attached the ct_labelcycler code for future reference (change the extension from .txt to .lua).Using Ultimate license - that means anyone can play.
Valarian's Fantasy Grounds Rulesets
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks