Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Confusion over RPG text boxes

Author
Message
Kelz
19
Years of Service
User Offline
Joined: 7th Apr 2005
Location: At the computer
Posted: 18th Apr 2005 07:35
I've seen it in many threads but im still
In an RPG you go up to someone press a button a text box comes up and people talk
I read something about having to paste image because you can't put text onto a sprite? is this right?
Could someone explain to me in words of one syllable how text boxes work in rpg's because i would really like to understand. also if someone could put any sample code for me to look at this would be an added bonus and greatly appreciated
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 19th Apr 2005 13:40
It's not too tough.

First, yes - you can put text into a sprite.


And basically, the rest is just an expansion of that concept.

Use Mouse Click() and Pick Object() to determine if a character has been 'clicked on.'

Use Object Screen X/Y() to get base to determine where to position the sprite so it appears next to / above the character.

And that's about all there is too it.

Some advanced concepts:
~Determine the size of the BitMap and Image by using Text Width() and Text Height()
~Make a larger bitmap than you need and determine the image size instead.
~Load images from .bmp files you've created with the desired text for better graphics.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
Kelz
19
Years of Service
User Offline
Joined: 7th Apr 2005
Location: At the computer
Posted: 20th Apr 2005 02:32 Edited at: 22nd Apr 2005 01:21
Thank you thats really helped me understand it!
It's not that complicated when someone explains it clearly
Another question, when writing functions with variables outside it could you copy the variables into a new file save it and then put it within the function?
e.g
function functionname()

#include "variables.DBA"
----function stuff----
endfunction

would this be better than writing them out again?
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 22nd Apr 2005 11:49
get image is slow though.
Here's something I wrote awhile ago. Reads a text file, then outputs the text into a scrollable window with text wrapping. It wouldn't take much to adapt it to what you want.



PETA - People for the Eating of Tasty Animals

Login to post a reply

Server time is: 2024-09-23 17:21:23
Your offset time is: 2024-09-23 17:21:23