At 5:55 PM -0500 2/16/2001, Changhsu P. Liu wrote:
>Is there a formula that would change a bigger value to small value, 
>smaller value becomes bigger.
>
>In a game I'm working on, I have the player's mouseDow and mouseUp 
>distance as force. My script for the action is based on steps. So if 
>I have bigger force, than my steps would be smaller so it takes less 
>time to reach from one point to another. I wonder if there is a 
>mathematics way that can reverse it automatically.
>
>For example moving 300 pixels distance, I want it to become 100 
>steps. if moving 100 pixels, it becomes 200 steps. The numbers here 
>are not absolute. I don't want to assign them since it would look 
>less random and less natural.


you could do some variation on this:

--init your values
step = 300
scaleFactor = .9

--to decrement
step = (step * scaleFactor)
put step
-- 270.0000





-- 

     Roy Pardi
--------------------------------------------------------------------
Multimedia Developer   +  Lingo Programming Consultant
                                 [EMAIL PROTECTED]
--------------------------------------------------------------------



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to