I have a "Sheet" for each NPC. That sheet is a small statblock with "links" to attack, adjust health/etc. These are used by the DM. I like to have the entire "encounter" sheets up and in a single tab "window".
Here is an example of what I am talking about:
http://www.evernote.com/l/ASDDMR6voAFMY ... YTpsqJSrs/
* See if the "npc sheet" page is visible and close it.
* During initiative if "npc sheet" is visible "select" it (bring to front?).
Here is the code I use for "if visible close" for when an NPC dies.
Code: Select all
[if(myHP <=0), code :{
[h: sendToBack(myID)]
[h: npcSheetFrame = strformat('NPC:'+getName(myID)+':%{myID}')]
[h, if(isFrameVisible(npcSheetFrame)): closeFrame(npcSheetFrame)]
[LOG_KILL(myID)]
[h: gmOUT = concat(gmOUT,strformat("%{macro.return}"))]
[h: outTxt = concat(outTxt,strformat("%{myName} is dead!"))]
[h: setState("NPCDead", 1,myID)]
};{}]
Is there a way around this? I like to have all my npc frames for a encounter open in a tab window.
Here is the code clip I use to attempt to "select" the frame during initiative.
(whoWent is a tokenID)
Code: Select all
[h: npcSheetFrame = strformat('NPC:'+getName(whoWent)+':%{whoWent}')]
[h, if(isNPC(whoWent) && isFrameVisible(npcSheetFrame)): resetFrame(npcSheetFrame)]
Can either of these features be added to upcoming versions? It would really be convenient feature set to use.