#progress bar not working

1 messages · Page 1 of 1 (latest)

waxen trellis
#

ok

crude compass
#

Can you monitor score in the editor? See if anything is changing?

#

Or how it’s changing?

waxen trellis
#

it is changing

#

i can see it changing

#

yeah i just checked to be sure its definitely changing

crude compass
#

I see you’re using localScale

waxen trellis
#

yeah

#

i was told to use that

crude compass
#

Is the parent object really big?

waxen trellis
#

not really

crude compass
#

Try using regular scale

waxen trellis
#

i'm only changing the x and the x is the same for both of them

#

ok lemme try

crude compass
#

Might have to adjust some numbers

waxen trellis
#

wait how

#

i can't just change localscale to scale

#

how do i change scale

#

im surprised i've never had to do this before lmao

crude compass
#

it should just be transform.Scale

waxen trellis
#

it doesn't allow it

crude compass
#

That’s weird

#

One second

#

Ig Scale isn’t even a thing

#

Let me look something up real quick

#

Well there is lossyScale, but it’s read only

#

Ig u juste have to use local scale

#

That’s weird though

waxen trellis
#

it is weird

#

so why does it just snap to whole numbers...

crude compass
#

Is it rounding?

#

Is that what you mean by snap?

waxen trellis
#

yeah

#

its rounding up

#

to 1, then 2, then 3

#

but i want decimals

#

given that 1 is the scale i want when the score is max

crude compass
#

Hmm

#

So does it end up bigger than the progress bar?

#

If the 1 is the max scale and it’s getting to 1, then 2, then 3?

waxen trellis
#

well basically it stays at scale 0 until i hold down for long enough and the score reaches 1000 (max) and the scale is set to 1

#

then if i keep holding, it goes to scale 2 at 2000

#

then 3 at 3000

#

and so on

crude compass
#

Ah, I see

#

That is so weird

waxen trellis
#

i know!

crude compass
#

You might have to ask someone else cause I’m stumped

#

I’m sorry

waxen trellis
#

no worries

crude compass
#

I’ll keep thinking

#

And let you know if I find anything

#

Hmm I might have an idea

#

Are score and reqscore integers

#

@waxen trellis

waxen trellis
#

just one second

#

i think you're right

crude compass
#

It’s a casting thing

#

Instead of (float)(score/reqscore)

#

Try (float)score/(float)reqscore

waxen trellis
#

or i could just change them from "public int" to "public float"

#

so they're floats from the start

crude compass
#

That too

#

Try that

waxen trellis
#

i feel hopeful

#

here we go

#

LETS GOOOOOOOOOOOOOOOOO

#

IT WORKS

crude compass
#

Yeah, with your old code you were dividing two integers and trying to return a decimal

#

But it can’t

#

So it had to return and integer

waxen trellis
#

yeah i see now

#

thanks mate

crude compass
#

Ye ofc

waxen trellis
#

this is epic