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 / Battle Question

Author
Message
Zombie 20
17
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 14th Sep 2009 05:18
Hey guys have a question about a battle system I've picked back up

I have my guys and enemies set up



i also have these battle maths set up but i've run into a roadblock



I don't know how to input different character as all don't have thhe same stats. I'll add more code if wanted. Thanks everyone.

zombie


Coffee coffee coffee coffee coffee coffee cappacino, JAVA!
Zombie 20
17
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 14th Sep 2009 05:22
sorry to double post I forgot this.

every time I input someone with this code

charagi * chardef

it just comes out to 0 , it shouldn't be a zero for multiplication


Coffee coffee coffee coffee coffee coffee cappacino, JAVA!
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 14th Sep 2009 05:37
sounds like you just need to use more arrays formatted like so:

arra (EnemyNumber,DATA)

for your multiplication problem, make sure you are using the correct variables (for instance if you leave out a # then you will get zero since the variable hasn't been used)

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Zombie 20
17
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 14th Sep 2009 06:15
Yea i was mismatching variables. Thanks man


Coffee coffee coffee coffee coffee coffee cappacino, JAVA!
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 15th Sep 2009 00:21
yep you should have a few arrays for stats (don't put them all in one array like enemy(enemynum,stat) because that will become confusing). Use DATA statements to load the arrays too.

TGC Forum - converting error messages into sarcasm since 2002.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 15th Sep 2009 02:04
you could use external files too for loading, if you want it to be more customizable by the user.

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Zombie 20
17
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 15th Sep 2009 02:08
Okay I've been re-formatting this for a good bit now and am honestly stuck. What is happening is my enemy keeps choosing magic even when his number isn't up for that. Its rather confusing, any help is appreciated again .



cheers
zombie


Coffee coffee coffee coffee coffee coffee cappacino, JAVA!
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 15th Sep 2009 02:31 Edited at: 15th Sep 2009 02:33
You haven't put anything in the Dim so it is automatically set at 0 which is magic. Something strange in that you Dim Enechoice#(3) but then use Enechoice#(3,Enemagic) which I thought was an error.

I think that you are trying to use the Dim as Enechoice#(3,3), so it should be set up that way really. You don't seem to be using floats either so you don't need the # sign.

Zombie 20
17
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 17th Sep 2009 14:15
Pincho - sorry for not getting back to you, homework,work and sleep kept me away. Thank you and obese too for your advice. When I get home today I will apply it right away.


Thanks again guys, once this engine is worked out I can basically preload anything I want .

Zombie


Coffee coffee coffee coffee coffee coffee cappacino, JAVA!

Login to post a reply

Server time is: 2024-05-01 21:53:51
Your offset time is: 2024-05-01 21:53:51