The Daily Click ::. Forums ::. Klik Coding Help ::. Floating damage text help?
 

Post Reply  Post Oekaki 
 

Posted By Message

flashfire



Registered
  03/12/2010
Points
  7
4th December, 2010 at 01:12:43 -

I'm trying to make floating damage text which show how much damage your attack has done to an enemy anyone got an example of this?

 
n/a

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
4th December, 2010 at 10:40:36 -

It's fairly simple to do that:

on damage
-
create string
set string alterable to str$(dmg)


And for extra effect just add bouncing movement to the string, with only movement up. Set speed to 40.

Always
-
set string speed to speed-1

string speed = 0
-
destroy

You can also use opacity instead of bouncing movement the same way. Or both actually

Edited by Don Luciano

 
Code me a sausage!

Zephni

My other cars a Balrog

Registered
  17/10/2007
Points
  4019

Has Donated, Thank You!VIP MemberSonic Speed
4th December, 2010 at 10:59:25 -

Don said the best/easiest way to do it I think. Make sure u untick the "display as background" on the string properties.

 
dont make me divide by zero...

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
4th December, 2010 at 14:30:40 -

And although obvious, make sure you create the string at the correct x/y position on each enemy. For example if you get it looking good centered on a small enemy the same x/y position might look like shit on a bigger, wider enemy.

You can also use the text blitter in lieu of a string object if you want to get fancy.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!
   

Post Reply



 



Advertisement

Worth A Click