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.

DarkBASIC Discussion / Bit of coding help

Author
Message
Proton blast
20
Years of Service
User Offline
Joined: 30th Nov 2004
Location: London ontario canada
Posted: 2nd Dec 2004 09:36
i was wondering if i could use the text command and add a variable to it

this is the only thing i could think of.... and it doesn't work


A one that is not cold is scarcely a one at all
dj blackdragon3710
20
Years of Service
User Offline
Joined: 5th Nov 2004
Location: In LaLa land
Posted: 2nd Dec 2004 10:10
Well normaly if you want the player to press a button and get a reaction from the button, you use the input command like so:


and so on and so forth. Did that help?

It has been said that the body is a slave to the mind. Only the mind knows no freedom.
Proton blast
20
Years of Service
User Offline
Joined: 30th Nov 2004
Location: London ontario canada
Posted: 2nd Dec 2004 10:20
no not that, I got that good..... i think
i mean the HP/MAX HP, for me when i run my game it looks like "h1"/300 and i want it to say the variable HP not the actual word h1


A one that is not cold is scarcely a one at all
computer
20
Years of Service
User Offline
Joined: 5th Oct 2004
Location:
Posted: 3rd Dec 2004 01:12 Edited at: 3rd Dec 2004 01:14
You dropped the mic DJ, now I'll do the fillin'
I'm helpin' out the Blast you know by giving him this message


Convert h1 into a string. You can do this real easy by writing

h1=300
h1string = STR$(h1)

Then use '+' rather than ; or , like in other programming langs.

Replace this line with your one.
text 300,20,"HP: "+str$(h1)+"/300"

Yes there will be coding problems.
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 3rd Dec 2004 03:37
Dang you, computer, you got here before I did. I like answering questions that I actually know something about...

Xander Moser - Bolt Software - Firewall
Proton blast
20
Years of Service
User Offline
Joined: 30th Nov 2004
Location: London ontario canada
Posted: 3rd Dec 2004 04:23

this doesn't seem to work eigther
i get an error on the h2string =str$(h2) part
and if i comment it out i get an error on h1string=str$(h1)

A one that is not cold is scarcely a one at all

Login to post a reply

Server time is: 2025-05-24 17:20:08
Your offset time is: 2025-05-24 17:20:08