if jumping=0 //if u want the imagespeed different then when the object is jumping or not.
{
image_speed=.5
}
if keyboard_check(vk_left) //checks if left arrow key is pushed.
{if pull=0 //checks if pull=1 so the sprite does not turn around.
{image_xscale=-1} //sets the player faceing left.
else
image_xscale=1
if jumping=0 and push=0 and pull=0 //checks if player is in the air or not and if the player is pushing in an object.
{
sprite_index=Walk}
if jumping=1 //checks if player is in the air.
{sprite_index=Jump}
if place_free(x-2,y) //checks if the next movement is free of collision.
{
x-=2}}
if keyboard_check_released(vk_left) //checks if player releases key
{if pull=0 //checks if pull=1 so the sprite does not turn around.
{image_xscale=-1} //sets the player faceing left.
else
image_xscale=1
if jumping=0
{
sprite_index=Stand}
}
if keyboard_check(vk_right)
{if pull=0 //checks if pull=1 so the sprite does not turn around.
{image_xscale=1} //sets the player faceing right.
else
image_xscale=-1
if jumping=0 and push=0 and pull=0 //checks if player is in the air or not and if the player is pushing in an object..
{
sprite_index=Walk}
if jumping=1 //checks if player is in the air.
{sprite_index=Jump}
if place_free(x+2,y)
{x+=2}}
if keyboard_check_released(vk_right) //checks if player releases key
{if pull=0 //checks if pull=1 so the sprite does not turn around.
{image_xscale=1} //sets the player faceing left.
else
image_xscale=-1
if jumping=0
{
sprite_index=Stand}
}
if keyboard_check_pressed(ord("Z")) and jumping=1 and djump=4
{vspeed=-5 //launches the player in the air
jumping=1
djump=3
image_speed=.5 //allows u to change the imagespeed while ur player is in the air
sprite_index=Jump}
if keyboard_check_pressed(ord("Z")) and jumping=0 //checks if the z key was clicked and weather the player is in the air or not.
{
vspeed=-5 //launches the player in the air
jumping=1
image_speed=.5 //allows u to change the imagespeed while ur player is in the air
sprite_index=Jump}
if jumping=1 and vspeed>0 //checks too see when to set the fall sprite.
{
if image_index>17 //sets it to the image in the sprite for landing
{
image_speed=0}} //doesnt allow the image to change.
if u want the imagespeed different then when the object is jumping or not
当图片高速转化时 任务是否移转
checks if left arrow key is pushed
确认方向键中的左键 是否被按下
checks if pull=1 so the sprite does not turn around
确认当PULL=1时 子画面无法跳转
{image_xscale=-1} //sets the player faceing left.
else
image_xscale=1
图像处理性能 =-1 用户设定显示脱离(缺失)
除非 图片处理=1
if jumping=0 and push=0 and pull=0 //checks if player is in the air or not and if the player is pushing in an object
当移转 推取=0时 确认任务取得(下载)时用户组是否空闲
checks if player is in the air
确认用户组是否空闲
checks if the next movement is free of collision
确认下一活动是空闲或冲突
checks if player releases key
检查用户KEY是否断开
launches the player in the air
使用户空闲
allows u to change the imagespeed while ur player is in the air
当UR用户空闲时允许你高速转变图片
checks if the z key was clicked and weather the player is in the air or not
检查Z键。。。。。。。。。
checks too see when to set the fall sprite
当设置子屏幕下落或停止时请检查
sets it to the image in the sprite for landing
设置图片显示在子屏幕
doesnt allow the image to change.
不允许图片更改 作者: starrain 时间: 2009-5-18 11:32