Posted By
|
Message
|
tetsuya_shino
Registered 12/08/2004
Points 491
|
22nd August, 2011 at 05:09:51 -
Greetings. I have a quick question. Do you know like in an RPG when you attack an enemy a little number pops up showing how much damage you did? I know how to do that, however, I am trying to find the best way to do many of them. Since as in Front Mission when you use a machine gun and there 10 or more different little numbers poping up.
Any ideas? Use TGF by the way. Thanks
n/a
|
Rob Westbrook
Registered 25/05/2007
Points 193
|
22nd August, 2011 at 12:31:56 -
How have you got the damage set up? Like, is it from multiple bullet hits with individual actives? For that, just create a new counter (or string, or, as I use, a Text Blitter if that's available in TGF) and set it to whatever damage was caused. Then give it some movement upwards. A good little one that I use is this (moveY being an Alt. Value):
(in your damage/collision code)
-create object(damage icon) at collision point
-set moveY(damage icon) to 10
moveY(damage icon) > 0
-Y(damage icon) -= moveY/2
-subtract 1 from moveY
moveY(damage icon) = 0
-delete damage icon
Hope this helps!
There are 10 types of people in the world: Those who understand binary and those who don't.
|
tetsuya_shino
Registered 12/08/2004
Points 491
|
22nd August, 2011 at 13:10:38 -
Thank you for your advice. I'll look into using a string or a text blitter.
n/a
|
Del Duio Born in a Bowling Alley
Registered 29/07/2005
Points 1078
|
22nd August, 2011 at 17:36:13 -
I use a text blitter object myself for damage pop-ups it works really well. You can assign them values so say when one's created you can assign value A = 5 and then every 0.5 seconds you can subtract from that A. When A = 0 you can have the game destroy that blitter object.
--
"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!
|
AndyUK Mascot Maniac
Registered 01/08/2002
Points 14586
|
23rd August, 2011 at 00:50:03 -
It's actually quite important you say if you're using TGF1 or TF2. TGF 1 doesn't have text blitter and you can't move counters about either.
.
|
tetsuya_shino
Registered 12/08/2004
Points 491
|
23rd August, 2011 at 06:28:33 -
Yeah, it's been a while since I posted here. I goofed up leaving that info out.
Well I already found a way to do it in tgf, but I thought I'd ask if there was an easier way out there.
n/a
|
|
|