The Daily Click ::. Forums ::. Klik Coding Help ::. Am i just being stupid?? wherd my decimal point go!!
 

Post Reply  Post Oekaki 
 

Posted By Message

Zephni

My other cars a Balrog

Registered
  17/10/2007
Points
  4019

Has Donated, Thank You!VIP MemberSonic Speed
27th September, 2008 at 12:45:29 -

~ Um... unless im being an absolute noob.. But ive made platform engines and used loops with alterable values for years.. but i kinda had a break. Now im back and my MMF only understands integers! what have i done or am i missing somthing coz:

Active object holds conts like max speed and acceleration. max spd is 4 or whatever and accel is 0.3
Then theres another active object that holds the temporary horizontal values.

When the player holds down a direction and the horizontal value is less than max speed it adds the conts value "acceleration" which is 0.3.

i set a counter/string to see what the horizontal value was doing and it wasnt budging atal!?
But then i set the accel to 1 (integer) and the horiz value flew up. But obviusly its too fast.


So... if im just being stupid i blame it on that i havent used mmf for a while, but still, what the hell?

 
dont make me divide by zero...

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
27th September, 2008 at 13:13:22 -

I've had problems with decimals before when I didn't set my alt variables to decimals in the first place.

Ex. Instead of Alt variable A = 4, it had to be entered as A = 4.0

Maybe you should try setting your max speed to 4.0 instead of 4 and see if that works.


Image Edited by the Author.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Zephni

My other cars a Balrog

Registered
  17/10/2007
Points
  4019

Has Donated, Thank You!VIP MemberSonic Speed
27th September, 2008 at 13:23:04 -

~ Hey yeah i see what you meen, coz then mmf knows to make space for floats and not just integers. But i tried it and its still being gay. Ah, i just relised im useing mmf 1.5, *opens MMF2*

Thanx for reply!

 
dont make me divide by zero...

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
27th September, 2008 at 13:27:54 -

No problem. I had issues before when I wanted the percentage of enemy HP left to be shown on a life bar and after I added the " .0 "at the end it worked right.

I guess because you can't define alt variables at the start as integers, long, or boolean it assumes integer unless you do that.

Image Edited by the Author.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!
   

Post Reply



 



Advertisement

Worth A Click