So I have a load level function that is supposed to work like an indicator to see how much of the level has loaded. The problem is it will only say 0% or 100%, does not update in between those values. What am I missing?
Function LoadLevel(lvlnum)
`Array Counter
counter = 0
`SETUP ARRAY FOR IMAGES AND OBJECTS TO LOAD
dim images(2,22) as string
dim objects(2,20) as string
imgstart = 100
total = 22
`SET LEVEL 1 ARRAY FOR IMAGES------------------------
images(1,1) = "textures/bread_stall.dds"
images(1,2) = "textures/cart3.dds"
images(1,3) = "textures/clothing_stall.dds"
images(1,4) = "textures/fish_stall.dds"
images(1,5) = "textures/fort_entrance.dds"
images(1,6) = "textures/fruit_stall.dds"
images(1,7) = "textures/cart3.dds"
images(1,8) = "textures/meat_stall.dds"
images(1,9) = "textures/medhouse7.dds"
images(1,10) = "textures/medhouse11.dds"
images(1,11) = "textures/medhouse11.dds"
images(1,12) = "textures/medhouse15.dds"
images(1,13) = "textures/medhouse16.dds"
images(1,14) = "textures/medtexA.dds"
images(1,15) = "textures/medtexB.dds"
images(1,16) = "textures/medtexD.dds"
images(1,17) = "textures/medtexE.dds"
images(1,18) = "textures/medtexF.dds"
images(1,19) = "textures/medtexG.dds"
images(1,20) = "textures/medtexJ.dds"
images(1,21) = "textures/medtexK.dds"
images(1,22) = "textures/medtexl.dds"
do
cls
perc# = (counter/total)*100
print "Loading..." + str$(perc#)+"% Complete"
if counter < total
inc counter
load image images(lvlnum,counter),imgstart : inc imgstart
endif
sync
loop
EndFunction
EDIT:
Disregard. Apparently I had to make the total value a real number as well, which I was not aware of.