F_Damage

by Flick
Displays damage taken above a player or enemies head. [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Flick.F_Damage##version=4

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Flick.F_Damage##version=4

2200 downloads
Version 1.1.0
Date added: Aug 5 2006
Last updated: Jun 18 2011
30 fans
Displays damage taken above a player or enemies head. Text font may be customised with a different icon, and text colour may be customised between calls dynamically. Unlike s_damage, this library can display a large range of numbers, including numbers in scientific notation.


Version 1.0.0:

Notably, icons are cached as required. This means that on a test machine, regular calls to F_Damage to display the same color text go from taking ~20 ms every time, to ~4 ms on average, with times no worse than before. This means compared to the initial release of F_Damage in 2006, performance has been improved for all library users.


Version 1.0.1:

Added two define options:

F_damage_assume_world_size - If set, will simplify icon size calculations.

F_damage_sleep - If set, will sleep(1) in F_Damage, to help long calling procedures to progress.

The first provides a performance improvement if you don't need F_Damage to center perfectly on big icons enemies. The second helps cover you for cases where F_Damage is executed in long procedures, and users may see a delay in flicking the damage numbers.

Version 1.1.0:

Adds a define option:

F_damage_no_scientific - Turns off scientific (1E+40) notation.

Removes two define options from 1.0.1, as their performance difference is negligible. This can be added back if performance regressions occur.

Adds a new option:

Horizontal alignment - Text can be left, center, or right aligned with an optional argument. Pleas see the library for specifics. F_Damage_Horizontal_Alignment can be extended for custom alignment rules.

Comments

Darker Legends: (May 15 2012, 3:30 am)
I see, thanks for the quick response.
Stephen001: (May 15 2012, 3:29 am)
We can do this as a very basic thing, but I'm still not sure quite what support maptext has for styles at present, so it'd probably be rather limited in use.
Darker Legends: (May 15 2012, 3:18 am)
Will there be maptext support?
Flick: (May 5 2012, 4:35 pm)
Stephen001 wrote:
I'm glad you like it!

Me too :) And thanks to Stephen001 for keeping up with and greatly improving this. I appreciate it.
Stephen001: (May 5 2012, 3:25 pm)
I'm glad you like it!