Hello. I am very new to C++. About a week to be exact. Either way, I have been studying it alot, and have come to know quite a bit for one week. Yet, I have some questions to ask.
#1 If I was going to make a game for example, how would I randomize the damage according to the item. For example if i would have int knife = 1; just to say that the person has a knife, how would I make the damage ranging from about 1-3 damage. I know this may be a little hard to understand, so I'd be more than happy to try to explain again if you can't understand me.
#2 How would I create a class so that when i skip from function to function, or even bracket to bracket, the same integers AND values would stay with the flow of the game. For example. If I would have int knife = 1; and i skipped functions how would i make knife still = 1? Also, along this same line, how would i "save" per say an item so that when i skip brackets or functions the person would still have a knife. I do realise this is not a simple 1 line code also. But help would be very helpful.
#3 How would I save items to a file that can be called when the .exe is run once again.
#4 How do put images and audio into script.
Phew, I think that's it for me, Thanks.