///Slow down plane
///---Vertical Speed----////
if (vspeed<=-2)
{
vspeed+=.1
}
if (vspeed>=-2 && vspeed<=0)
{
vspeed-=.1
}
if (vspeed>=0)
{
vspeed-=.1
}
else if (vspeed=-2)
{
vspeed=-2;
}
///---Horizontal Speed---////
if (hspeed>=0)
{
hspeed-=.1
}
if (hspeed<=0)
{
hspeed+=.1
}
else if (hspeed=0)
{
hspeed=0;
}
I also changed the arrow keys so that instead of jumping to a position, instead they would just increase the vspeed/hspeed by 5 in the desired direction.
e.g. Right Arrow Key
if (x<=room_width-80) hspeed=5
The problem/s- Firstly, I think the slowing down script could be written better, so any help with that would be great. But the real problem is that when you release the right or up arrow keys, the plane slows to an almost stop and keeps moving right/up. All the other keys work as they should, though.
Here is an attached example of the problem.
Download Mirror 1
(NOTE: This is not his actually game, just the GM8 tutorial with the code added)
Thanks in advance,
-Derme
Edited by Derme, 20 April 2011 - 12:21 AM.











