GameMakerHelpBlog

Saturday, January 6, 2007

Speed and outside room *funny stuff*

Hi this is a funny script i made for a bit of fun as well as a script for games

Ok in the obj_person create event put either vspeed+=1 or hspeed+=1

outside room event
[CODE]


{
if (x < 0 && hspeed < 0) x = room_width + sprite_xoffset;
if (x > room_width && hspeed > 0) x = -sprite_width + sprite_xoffset;
if (y < 0 && vspeed < 0) y = room_height + sprite_yoffset;
if (y > room_height && vspeed > 0) y = -sprite_height + sprite_yoffset;
}
[/CODE]

This will cause him to go so fast it ain't funny but it is funny!

Labels:

1 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home