audi123
|
Posted: Tue Dec 14, 2010 9:58 am Post subject: Can Someone how me on my program? |
|
|
setscreen ("graphics")
var x,y:int
var headx,heady,bodyx,bodyy, leftlegx,leftlegy,rightlegx,rightlegy,leftarmx,leftarmy,rightarmx,rightarmy:int
var chars : array char of boolean
Input.KeyDown(chars)
loop
if chars (KEY_UP_ARROW) then
heady:=heady+5
end if
if chars (KEY_RIGHT_ARROW) then
headx:=headx+5
end if
if chars (KEY_DOWN_ARROW) then
heady:=heady-5
end if
if chars (KEY_LEFT_ARROW)then
headx:=headx-5
end if
headx:=100
heady:=100
bodyx:=100
bodyy:=45
leftlegx:=80
leftlegy:=14
rightlegx:=125
rightlegy:=12
leftarmx:=75
leftarmy:=60
rightarmx:=130
rightarmy:=60
drawfilloval (headx,heady , 15, 15, green) %Head%
drawline (bodyx,bodyy , 100, 100, green)%Body%
drawline (leftlegx, leftlegy, 100, 45, green)%Left Leg%
drawline (rightlegx,rightlegy , 100, 45, green)%Right Leg%
drawline ( leftarmx,leftarmy , 100, 75, green)%LeftArm%
drawline ( rightarmx,rightarmy , 100, 75, green)%Right Arm%
end loop
Basically it doesnt move around when i press the arrow keys -,- |
|
|