View Single Post
  #4  
Old 10-15-2008, 12:23 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
An ice-skating script works best in this way: you have two velocities, X and Y. From there, you add to the X and Y velocities depending on the movement of the player. If they're moving left, subtract X velocity, if they're moving right, add to the X velocity. Do the same for up/down and the Y velocity. It's important to allow these velocities to go into the negatives as well. If the player is not moving, move both X and Y velocities toward 0(until they reach 0).

That's about the gist of it. There is also wall-detection and such.
Reply With Quote