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 / Problem with multiple enemies

Author
Message
Jaded Gamer
18
Years of Service
User Offline
Joined: 19th Apr 2006
Location: Iceland
Posted: 24th Sep 2011 22:40
I am very frustrated with this little piece of code. This is a very simplified portion of the code, but it reproduces the problem I am having, which is the final opponent is never killable. I cannot for the life of me figure out what I am doing wrong but it is probably something simple or obvious that I am overlooking. Please help, I am stumped.



"So it goes."
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 25th Sep 2011 15:25
The code kept printing text on top of other text, so I added a variable that could be used to show it. I made some quick revisions, but there are more efficient ways of doing this (don't have time now to edit it in detail). You really are only checking if it destroys one monster, even though you can have more than one monster present.




Jaded Gamer
18
Years of Service
User Offline
Joined: 19th Apr 2006
Location: Iceland
Posted: 25th Sep 2011 18:58
Sorry, when trying to simplify the code to make it run independently I took out a lot of variables and it looks a mess... only one creature is being checked for when attacked with a weapon because only one creature can be attacked at a time in that method.
Anyway, I have figured out how to fix my problem.
thank you for your time and efforts, it really is very much appreciated.

"So it goes."

Login to post a reply

Server time is: 2024-11-22 12:21:35
Your offset time is: 2024-11-22 12:21:35