RPTools.net

Discussion and Support

Skip to content

It is currently Fri Dec 15, 2017 3:00 pm 






Reply to topic  [ 2 posts ] 

Previous topic | Next topic 

  Print view

Author Message
 Offline
Kobold
 
Joined: Mon Apr 05, 2010 6:38 pm
Posts: 17
 Post subject: [DN 5.1] Help: Healing Surge
PostPosted: Fri Aug 26, 2011 4:09 pm 
Anyone have the code and instructions to get a healing surge bar working with the DN Character Sheet v5-1.

I have the bar created as "SurgeBar" within the campaign properties and is two colors to show the bar adjust as the healing surges are used.

I figure that a Macro needs to be added to the "Health" section of Lib:Execute and that the Macro needs to do the following to the appropriate Properites... I'm hoping someone can help me figure out how the code should be written to get the bar to adjust correctly as healing surges are used by the character.

DNA_HealingSurgeRemaining/DNA_HealingSurgeTotal

Thanks,


Top
 Profile  
 
 Offline
Kobold
 
Joined: Mon Apr 05, 2010 6:38 pm
Posts: 17
 Post subject: Re: [DN 5.1] Help: Healing Surge
PostPosted: Fri Aug 26, 2011 7:13 pm 
Using some code for health bars that was created by Darakonis, I was able to apply it to making a healing surge bar and then just needed to add the following line...

Code:
<!-- Surge bar-->
[H, macro("SurgeBar@Lib:Execute"): ""]

To the macros SurgeRecord & RestRecord

For those that might want the code, which I'm sure could be written better, for fun I thought I might make a few different colors later...

Code:
<!--Surge bar-->
[H: setBarVisible("SurgeBar",0)]
[H, if(DNA_HealingSurgeRemaining / DNA_HealingSurgeTotal <= 0.6): bar.SurgeBar = (DNA_HealingSurgeRemaining/DNA_HealingSurgeTotal)]
[H, if(DNA_HealingSurgeRemaining / DNA_HealingSurgeTotal <= 0.4): setBarVisible("SurgeBar",0)]
[H, if(DNA_HealingSurgeRemaining / DNA_HealingSurgeTotal <= 0.8): bar.SurgeBar = (DNA_HealingSurgeRemaining/DNA_HealingSurgeTotal)]
[H, if(DNA_HealingSurgeRemaining / DNA_HealingSurgeTotal <= 0.6): setBarVisible("SurgeBar",0)]
[H, if(DNA_HealingSurgeRemaining / DNA_HealingSurgeTotal <= 0.4): bar.SurgeBar = (DNA_HealingSurgeRemaining/DNA_HealingSurgeTotal)]
[H, if(DNA_HealingSurgeRemaining / DNA_HealingSurgeTotal <= 0.2): setBarVisible("SurgeBar",0)]
[H, if(DNA_HealingSurgeRemaining / DNA_HealingSurgeTotal > 0.8): bar.SurgeBar = (DNA_HealingSurgeRemaining/DNA_HealingSurgeTotal)]
[H, if(DNA_HealingSurgeRemaining / DNA_HealingSurgeTotal <= 0.2): setBarVisible("SurgeBar",0)]
<!--The following turns off the bars for NPCs. Delete these lines if you want NPCs to display surge bars-->
[H, if(isNPC()==1): setBarVisible("SurgeBar",0)]
[H, if(isNPC()==1): setBarVisible("SurgeBar",0)]
[H, if(isNPC()==1): setBarVisible("SurgeBar",0)]
[H, if(isNPC()==1): setBarVisible("SurgeBar",0)]
[H, if(isNPC()==1): setBarVisible("SurgeBar",0)]


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 2 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman