я имел виду что возврат действий не было картинки после действия оставались прежние а не самая 1 картинка
Добавлено спустя 17 минут 28 секунд:помогите еще в одном коде надо что бы картинка последния переходила на первую
hera={}
hero_x = 10
hero_y = 200
hero_vel = 0
hero_g = 2
hero_jump = false
for i=1,8 do
hera[i] = pge.texture.load("p/p"..i..".png")
hero = 1
end
while pge.running() do
pge.gfx.startdrawing()
pge.gfx.clearscreen()
pge.texture.activate(hera[hero])
pge.texture.draweasy(hera[hero],hero_x,hero_y)
pge.gfx.enddrawing()
pge.gfx.swapbuffers()
pge.controls.update()
if pge.controls.held(PGE_CTRL_LEFT) and hero_x >= 0 then
hero_x = hero_x - 2
end
if pge.controls.held(PGE_CTRL_LEFT) and hero>8 then
hero=hero-1
end
if pge.controls.held(PGE_CTRL_RIGHT) and hero_x <= 480 then
hero_x = hero_x + 2
end
if pge.controls.held(PGE_CTRL_RIGHT) and hero<8 then
hero=hero+1
end
if pge.controls.pressed(PGE_CTRL_CROSS) and hero_y == 200 then
hero_vel = -18
hero_jump = true
end
if hero_jump then
if hero_vel < 18 then
hero_vel = hero_vel + hero_g
hero_y = hero_y + hero_vel
end
end
if hero_y >= 200 then
hero_vel = 0
hero_jump = false
end
end