Page 1 of 1
division glitch, wont go into decimals; i need another way
Posted:
Wed Mar 26, 2008 9:42 pm
by DarkParadox
i'm trying to make an x position into decimals, like so that if x = 30 transp = .30 without making about 100 lines of code, can someone give me a code for this?
Re: division glitch, wont go into decimals; i need another way
Posted:
Wed Mar 26, 2008 9:58 pm
by pyrometal
transp = (double)x / 100;
That should do it.
Re: division glitch, wont go into decimals; i need another way
Posted:
Wed Mar 26, 2008 10:06 pm
by DarkParadox
sadly, no....
Re: division glitch, wont go into decimals; i need another way
Posted:
Wed Mar 26, 2008 10:07 pm
by pyrometal
One sec, I'll post a demo!
Re: division glitch, wont go into decimals; i need another way
Posted:
Wed Mar 26, 2008 10:13 pm
by pyrometal
Here it is!
Drag the actor with the mouse to see the transparency change.
Re: division glitch, wont go into decimals; i need another way
Posted:
Wed Mar 26, 2008 10:17 pm
by DarkParadox
can you tell me how to do that when theres only 100 x i can go across?
Re: division glitch, wont go into decimals; i need another way
Posted:
Wed Mar 26, 2008 10:20 pm
by pyrometal
First, you have to tell me what you mean and what that is for.
Re: division glitch, wont go into decimals; i need another way
Posted:
Wed Mar 26, 2008 10:22 pm
by DarkParadox
i'm making a painter for a PDA game and need it for a transperancy slider
Re: division glitch, wont go into decimals; i need another way
Posted:
Wed Mar 26, 2008 10:22 pm
by pyrometal
Give me a moment, I'll do that too!
Re: division glitch, wont go into decimals; i need another way
Posted:
Wed Mar 26, 2008 10:24 pm
by DarkParadox
i just need the code
Re: division glitch, wont go into decimals; i need another way
Posted:
Wed Mar 26, 2008 10:34 pm
by pyrometal
Hmmm... Seems like I have a problem... I'll look into it more and post a little later, sorry for the wait.
Re: division glitch, wont go into decimals; i need another way
Posted:
Wed Mar 26, 2008 10:35 pm
by DarkParadox
i ONLY need the code
Re: division glitch, wont go into decimals; i need another way
Posted:
Wed Mar 26, 2008 10:44 pm
by pyrometal
I know you wanted only the code but I had to try it for myself... So here's a demo WITH the code inside!
Re: division glitch, wont go into decimals; i need another way
Posted:
Thu Mar 27, 2008 8:30 pm
by Game A Gogo
This happen in some way or another, I have no clue why...
But here is something that might help ya:
- CW-Sprite Designer.zip
- note, rotation only cause GE to freeze or something like... old thing I made
- (399.86 KiB) Downloaded 104 times
also why we post demo and not only the code, is because we have no clue how you settled up your thing
Re: division glitch, wont go into decimals; i need another way
Posted:
Wed Jun 04, 2008 2:34 pm
by JayInACob
guys, why dont u just multiply it by 0.001 ?