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 / Uhm, My monsters won't die.. (Text Based Game)

Author
Message
Confused DB Newb
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location:
Posted: 9th Feb 2005 16:12
They won't die... Max hit is 5, and the monsters hp is 10... if I hit them for a 5, then it hits the Repeat/Until Loop and somehow, the monsters hp reloads to 10...

I think I'm just really tired and not seeing the obvious here... something please give me a hint? lol
Oliver
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Switzerland
Posted: 9th Feb 2005 18:30
Can you post the source code again, i dont think it worked.
Confused DB Newb
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location:
Posted: 10th Feb 2005 07:12
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 11th Feb 2005 07:19
ill keep trying to fix it, but what its doing is only subtracting the hitpoints from it one time, then it doesnt do it anymore. Ill post back if i find out why

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 11th Feb 2005 07:25 Edited at: 11th Feb 2005 07:26
ok, what its doing is taking mhp=10 each time and subtracting from it each time, but mph is reseting at 10 each time, so ill try and figure out how to fix that part of it

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 11th Feb 2005 07:28
k, got it, change the "Mhp2=Mhp-Mhit" and the "Mhp2" to "Mhp=mph-mhit" and "mph"
This updates the mph instead of creating a new variable, which is what you need to do

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
Confused DB Newb
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location:
Posted: 12th Feb 2005 15:07
K this is what I have now. Your idea did work, until the second fight where the Mhp isn't updated to 10 again...

It still calculates Mhp as only being the remaining HP left over form the first fight...

First fight: hits 5 twice, savage dies
Second fight: hits 5 once, savage dies.. should hit at least twice

Here's what the code looks like after trying to fix it myself
Confused DB Newb
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location:
Posted: 13th Feb 2005 16:52
Sorry, source went weird again...



That's what I ended up with after trying to modify what you had suggested, and it's the only thing that came close to what is supposed to be happening... I'll keep trying
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 13th Feb 2005 23:16
ok, all u need to do is add this:

in the death gosub

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
Confused DB Newb
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location:
Posted: 15th Feb 2005 18:52
Thanks I'll try that later on, tell ya how it works
Confused DB Newb
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location:
Posted: 18th Feb 2005 04:47
Thanks it all works now.

Login to post a reply

Server time is: 2024-11-11 23:57:28
Your offset time is: 2024-11-11 23:57:28