mob/proc/detectionbp(mob/m)
var/bp = round(src.scanpct/m.bp*100)
var/bpstop=0
var/bpis=0
while(src.scanning)
if(bpstop>=100)
bpis = m.bp
winset(src,"scouter.bp","text='[m.bp]'")
src<<'scouter.wav'
else
bpstop += src.scanpct
bpis += bp
winset(src,"scouter.bp","text='[bpis]'")
sleep(1)
mob/player/DblClick()
var/html
if(usr.scouter && usr.scanhigh)
view(8)<<'scanning.wav'
//usr.detection(src)
winshow(usr, "scouter", 1)
usr.scanning=1
winset(usr,"scouter.name","text='Name: [src.name]'")
winset(usr,"scouter.race","text='[src.race]'")
if(src.bp>5000000)
winset(usr,"scouter.bp","text='Un-Detectable'")
usr.scanning=0
else //winset(src,"scouter.bp","text='[jru_Commafy(src.bp)]'")
usr.detectionbp(src)
Problem description:
I am trying to make it so when you double click a player that the scouter will start at 0 and raise by your scanpct untill it gets to 100% of the players power. But all it does is repeat the loop as if the bp stop isnt at 100% and it keeps playing the scouter noise every tenth of a second.. Can anyone help me out? I'd greatly appreciate it.