I'm trying to make a token dropper that uses only the graphics item to keep track of very specific stats for high quantity trash monsters. I am using the add:graphic event to inspect and manipulate the information of the new graphic. I do several tests, including looking for a "TokenDropper" attribute of the character represented by the token and seeing if it's 'on'. That leads up to checkpoint 6 and then checkpoint 7 shows up in chat without fail, every time, but the properties of the graphic get updated only half of the time. You would think that it would work, or that it won't, but why only half of the time, off-and-on-and-off-and-on-again??? By-and-large I'm not seeing errors in the API console. I put a link to two versions of the full code below. Can anyone help me out??? sendChat('Checkpoint 6', 'Preparation for Token update complete.');
obj.set({
represents:null, //Yes I do want to break the tie to the character sheet - these are trash tokens that I need only 1 character sheet for.
name:strTokenName,
bar1_value:numHPRoll,
bar2_value:getAttrByName(objDroppedChar.id, "npc_speed"),
bar3_value:getAttrByName(objDroppedChar.id, "npc_ac"),
bar1_max:numHPRoll
});
sendChat('Checkpoint 7', 'Dropped Token Updated.'); <a href="https://gist.github.com/ChrisScripts/edc0ee0023518c9d6b96e83c88c10bf4" rel="nofollow">https://gist.github.com/ChrisScripts/edc0ee0023518c9d6b96e83c88c10bf4</a>