ID:177655
 
How would I correct this to let you input the number of kaioken you want.

mob/var
Kaioken = 0
Kaioken_Power = 0

mob/verb
Kaioken()
if(usr.Kaioken)
usr.Kaioken = 1
usr.PL = usr.PL * 3
usr.Kaioken_Power = input("What Kaioken Level?") as num
usr << "You suddenly power up to kaioken level [usr.Kaioken_Power]"
return
else
usr.Kaioken = 0
usr.PL = usr.PL / 3
usr << "You begin to power down..."
return

Punkrock546

Punkrock546 wrote:
How would I correct this to let you input the number of kaioken you want.

mob/var
Kaioken = 0
Kaioken_Power = 0

mob/verb
Kaioken()
if(usr.Kaioken)
usr.Kaioken = 1
usr.PL = usr.PL * 3
<font color = red><font size = '+2'>usr.Kaioken_Power = input("What Kaioken Level?") as num</font color></font size>
usr << "You suddenly power up to kaioken level [usr.Kaioken_Power]"
return
else
usr.Kaioken = 0
usr.PL = usr.PL / 3
usr << "You begin to power down..."
return

Punkrock546

Ok. First take out the var Kaioken_Power. Then simply change the line above that is red to this

var/Kaioken_Power = input("What Kaioken Level?") as num|null

I think that should work. If not tell me

Little Kid
In response to LittleKid15
Hmm... It lets you input a number but it always displays it as 0. What's wrong...

mob/var
Kaioken = 0
Kaioken_Power = 0

mob/verb
Kaioken()
if(usr.Kaioken)
usr.Kaioken = 0
usr.PL = usr.PL / 3
usr << "You begin to power down..."
return
else
usr.PL = usr.PL * 3
var/Kaioken_Power = input("What Kaioken Level?") as num|null
usr << "You suddenly power up to kaioken level [usr.Kaioken_Power]."
return

Punkrock546
In response to Punkrock546
You are displaying usr.Kaiouken_Power. You know it is 0 because that was how you got into the else statement. Either display the local var named Kaiouken_Power or assign usr.Kaiouken_Power the input. I think you want the second.