I am making a EXP multiplier for a game, so when i key in an amount, i will tick the certain multiplier and it will multiply my EXP to display how much EXP i will earn.
I want to be able to know how to include statement if i check the checkbox so that the statement will be included, else it will not affect anything.
AIM:
i want the amount that i key in, which is exp, to multiply by 2 if system checkbox is checked. In which system = checkbox1
and the total exp to multiply by 1.5x if 'hs = checkbox4' is checked. And if both is checked, total exp will multiply by 2x1.5= 3. Else, it is just 2x or 1.5x. But i do not know how to do that.
For example(i do not know how to write it but it is something around the point i want)
system = exp * 2
hs = exp * (50 / 100)
If CheckBox1.CheckState = CheckState.Checked Then
totalexp INCLUDES multiplier system
ElseIf CheckBox1.CheckState = CheckState.Unchecked Then
totalexp is not affected by multiplier system
End If
If CheckBox4.CheckState = CheckState.Checked Then
totalexp INCLUDES multiplier hs
ElseIf CheckBox4.CheckState = CheckState.Unchecked Then
totalexp INCLUDES multiplier hs
End If
totalexp = hs * system
Please help!
Providing you have
TextBox1
as yourexp
input and two check boxes which areCheckBox1
andCheckBox4
forsystem
andhs
respectively and a button to process the input then you can have this code below.If both check boxes are checked then your input (
exp
) will be multiplied by 2 AND 1.5.If neither of the check boxes are checked, the display message will be zero. If you want that no message will be displayed once there will be no check box checked then you can add this right after the last
End If
codechange
MsgBox(exp)
to