•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Game Development section within the Software Development category of DaniWeb, a massive community of 402,652 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,164 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Game Development advertiser: Programming Forums
Views: 402 | Replies: 1 | Solved
![]() |
hi all, this is the same game (if you can call it that yet) that I asked for help with last time (but I sorted it out myself) this time the problem is getting hp off of a monster/character in the combat header Ive already got a damage function that works out how much hp to take off, and wether its a critical hit, the problem is that they are all in different headers and I cant get the referance function to work properly (I think) the fuction that Im tring to get to work is in comment so it will compile anyway. any help appreciated
PS same as last time, to view the files, right click save as, otherwise they dont seem to work!!!
PS same as last time, to view the files, right click save as, otherwise they dont seem to work!!!
Last edited by Raptoricus : Apr 18th, 2008 at 6:34 pm. Reason: Dodgy links (again :( )
"If the facts don't fit the theory, change the facts." Albert Einstein
Ive done it again
, kindof a noobie error problem 1:
didnt make a takeHP function in monster class
2: After I did I had some learning to do about how to add new variables into an existing function
in conclusion:
made function: takeHP2(int amount){setHP2()-amount};
//set hp sets a new amount of hp
then used it like so in combat function:
takeHP2(amount); //Id already worked out a damage amount function
hope some of my self solved posts help some people sometime, its been a learning experience for me
, kindof a noobie error problem 1:didnt make a takeHP function in monster class
2: After I did I had some learning to do about how to add new variables into an existing function
in conclusion:
made function: takeHP2(int amount){setHP2()-amount};
//set hp sets a new amount of hp
then used it like so in combat function:
takeHP2(amount); //Id already worked out a damage amount function
hope some of my self solved posts help some people sometime, its been a learning experience for me
"If the facts don't fit the theory, change the facts." Albert Einstein
![]() |
•
•
•
•
•
•
•
•
DaniWeb Game Development Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Rpg (Python)
- Please tell more ideas to put in this dev-pascal RPG game. (Game Development)
- Enhancing a Text based RPG (C++)
Other Threads in the Game Development Forum
- Previous Thread: 20 Questions game
- Next Thread: How to display 10 numbers to be chose in GUI?


Linear Mode