2 registered members (TipmyPip, 1 invisible),
18,731
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Final Fantasy style damage numbers ??
#308842
02/05/10 12:33
02/05/10 12:33
|
Joined: Apr 2008
Posts: 144 Germany | Niedersachsen (Lower...
Roxas
OP
Member
|
OP
Member
Joined: Apr 2008
Posts: 144
Germany | Niedersachsen (Lower...
|
Hey guys.
I wonder how to achieve something like the damage numbers in final fantasy, you know, when your character runs to the monster, and strikes him with his weapon, there're numbers which indicate the damage your character dealt.
I tried to use sprites with numbers from 0 to 9 and to show them above the enemy who was hit by a character depending on the damage he dealt.
the problem is, the numbers are facing the camera, what actually is fine to me, thats what i want, but they don't move to the camera. what i mean is, they stay on their given place, facing the camera. so they overlap eachother in the viewport.
i assume that there must be another possibilty like copying the numbers on a new sprite that'll face the camera. but i need some help because i do not know how to solve this
hope you can help me,
best regards Roxas
|
|
|
Re: Final Fantasy style damage numbers ??
[Re: Roxas]
#308843
02/05/10 12:44
02/05/10 12:44
|
Joined: Oct 2007
Posts: 5,211 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
|
render a panel with digits on bmap, and use this as the sprite's skin. i am not sure if this is posible but it should be.
3333333333
|
|
|
Re: Final Fantasy style damage numbers ??
[Re: Quad]
#308857
02/05/10 14:12
02/05/10 14:12
|
Joined: Jan 2004
Posts: 3,023 The Netherlands
Helghast
Expert
|
Expert
Joined: Jan 2004
Posts: 3,023
The Netherlands
|
VECTOR temp = vec_to_screen(player.x, camera);
draw_text(str_for_num(NULL, varDamageNum), temp.x, temp.y, vector(255,255,255));
if you use that in a loop, it'll draw the variable given at varDamageNum on the player's position. if you change the player.x to the entity you want to display the damage above, it should work fine. remarks: code is untested, so might not work instantly. Make sure the entity though is onscreen (temp != NULL). That should get you started  regards,
|
|
|
Re: Final Fantasy style damage numbers ??
[Re: Helghast]
#308863
02/05/10 14:30
02/05/10 14:30
|
Joined: Oct 2007
Posts: 5,211 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
|
from what i remember in FF the text spwans on enemy's head, so it is 3d, i mean it is smaller for enemies that are far away?
3333333333
|
|
|
Re: Final Fantasy style damage numbers ??
[Re: Quad]
#308876
02/05/10 15:42
02/05/10 15:42
|
Joined: Jan 2004
Posts: 3,023 The Netherlands
Helghast
Expert
|
Expert
Joined: Jan 2004
Posts: 3,023
The Netherlands
|
draw_textmode and set fontsize based on distance between target and camera? (you can also fade the text out using draw_textmode and a loop)
Last edited by Helghast; 02/05/10 15:42.
|
|
|
Re: Final Fantasy style damage numbers ??
[Re: Helghast]
#308908
02/05/10 18:59
02/05/10 18:59
|
Joined: Apr 2008
Posts: 144 Germany | Niedersachsen (Lower...
Roxas
OP
Member
|
OP
Member
Joined: Apr 2008
Posts: 144
Germany | Niedersachsen (Lower...
|
alright sorry for my late reply.
well as far as i know the numbers are always the same size, no matter if the camera is close or not, so maybe they just draw them on screen as a viewobject. but im not certain about that. i will try the draw-text thing later. maybe this works for me.
but to add a little something extra. i tried something like following:
i made a tga sprite for all numbers from 0 to 9, and they are all the same size, furthermore i made 4 black bmp's, one for each numbertype like, 1er, 10er, 100er and 1000er numbers.
for example - i got a damage of 122 the thing i tried is to isolate the first number and to bmap_blitpart it to the bmap which holds space for the 100er numbers. i wanted to make this for every number so that i would have a bitmap, which holds all numbers. and then i wanted to create it above the enemy's head. but it didn't work, i got a strange error which said nothing to me.
i hope you got the basic idea behind this.
best regards Roxas
|
|
|
Re: Final Fantasy style damage numbers ??
[Re: Roxas]
#308962
02/06/10 03:31
02/06/10 03:31
|
Joined: Jun 2004
Posts: 2,234 Wisconsin USA
FoxHound
Expert
|
Expert
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
|
If you want 3d numbers I would just model 0 - 9 numbers, set up to work in 10s and 100s or even 1000s and have them appear above the character's head when damage is inflicted. Also set up a green texture to use for healing.
--------------------- There is no signature here.
QUIT LOOKING FOR ONE!
|
|
|
Re: Final Fantasy style damage numbers ??
[Re: bart_the_13th]
#309233
02/08/10 02:50
02/08/10 02:50
|
Joined: Jun 2004
Posts: 2,234 Wisconsin USA
FoxHound
Expert
|
Expert
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
|
I'm not arguing with that, in Tower I made 2d numbers and had them moved with the blocks they were showing to be blown up, however the OP seemed set on using 3d numbers and I am working with that idea.
--------------------- There is no signature here.
QUIT LOOKING FOR ONE!
|
|
|
|