proc knight
setscreen ("offscreenonly")
Input.KeyDown (chars)
if chars ('o') then % Up Jump
for a : 1 .. 15
y := y + 7
View.Update
cls
delay (10)
Pic.Draw (jump1, x, y, picMerge)
end for
for a : 1 .. 15 % Down Sequence
y := y - 7
View.Update
cls
delay (10)
Pic.Draw (jump1, x, y, picMerge)
end for
elsif chars ('p') then % Backward Jump
for a : 1 .. 15
y := y + 7
x := x + 3
View.Update
cls
delay (10)
Pic.Draw (jump1, x, y, picMerge)
end for
for a : 1 .. 15 % Down Sequence
y := y - 7
x := x + 2
View.Update
cls
delay (10)
Pic.Draw (jump1, x, y, picMerge)
end for
elsif chars ('i') then % Forward Jump
for a : 1 .. 15
y := y + 7
x := x - 3
View.Update
cls
delay (10)
Pic.Draw (jump1, x, y, picMerge)
end for
for a : 1 .. 15 % Down Sequence
y := y - 7
x := x - 2
View.Update
cls
delay (10)
Pic.Draw (jump1, x, y, picMerge)
end for
elsif chars ('k') then % Walk forward
for a : 1 .. 2
x := x - 7
View.Update
cls
delay (40)
Pic.Draw (walk1, x + 10, y - 5, picMerge)
x := x - 7
View.Update
cls
delay (40)
Pic.Draw (walk2, x + 10, y - 5, picMerge)
x := x - 7
View.Update
cls
delay (40)
Pic.Draw (walk3, x + 10, y - 5, picMerge)
x := x - 7
View.Update
cls
delay (40)
Pic.Draw (walk4, x + 10, y - 5, picMerge)
end for
elsif chars (';') then % Walk Backwards
for a : 1 .. 2
x := x + 7
View.Update
cls
delay (40)
Pic.Draw (walk4r, x + 10, y - 5, picMerge)
x := x + 7
View.Update
cls
delay (40)
Pic.Draw (walk3r, x + 10, y - 5, picMerge)
x := x + 7
View.Update
cls
delay (40)
Pic.Draw (walk2r, x + 10, y - 5, picMerge)
x := x + 7
View.Update
cls
delay (40)
Pic.Draw (walk1r, x + 10, y - 5, picMerge)
end for
elsif chars ('l') then % Defence Sequence
for a : 1 .. 1
View.Update
cls
delay (75)
Pic.Draw (def1, x - 20, y - 10, picMerge)
View.Update
cls
delay (75)
Pic.Draw (def2, x - 20, y - 10, picMerge)
View.Update
cls
delay (75)
Pic.Draw (def3, x - 20, y - 10, picMerge)
View.Update
cls
delay (75)
Pic.Draw (def4, x - 20, y - 10, picMerge)
View.Update
cls
delay (75)
Pic.Draw (def5, x - 20, y - 10, picMerge)
View.Update
cls
delay (800)
Pic.Draw (def6, x - 20, y - 10, picMerge)
View.Update
cls
delay (100)
Pic.Draw (def7, x - 20, y - 10, picMerge)
View.Update
cls
delay (100)
Pic.Draw (def8, x - 20, y - 10, picMerge)
end for
elsif chars ('m') then % Power Smash
x := x - 2
View.Update
cls
delay (100)
Pic.Draw (atk1, x - 40, y, picMerge)
x := x - 5
View.Update
cls
delay (100)
Pic.Draw (atk2, x - 40, y, picMerge)
x := x - 5
View.Update
cls
delay (100)
Pic.Draw (atk3, x, y + 15, picMerge)
x := x - 5
View.Update
cls
delay (150)
Pic.Draw (atk4, x - 145, y - 35, picMerge)
x := x - 5
View.Update
cls
delay (300)
Pic.Draw (stance1, x - 15, y - 3, picMerge)
View.Update
cls
delay (400)
elsif chars ('n') then % Stab Attack
x := x - 2
View.Update
cls
delay (100)
Pic.Draw (stab1, x - 40, y, picMerge)
x := x - 5
View.Update
cls
delay (100)
Pic.Draw (stab2, x - 40, y, picMerge)
x := x - 5
View.Update
cls
delay (100)
Pic.Draw (stab3, x - 10, y, picMerge)
x := x - 5
View.Update
cls
delay (100)
Pic.Draw (stab4, x - 145, y - 15, picMerge)
x := x - 5
View.Update
cls
delay (150)
Pic.Draw (stance1, x - 15, y - 3, picMerge)
View.Update
cls
delay (200)
end if
View.Update
cls
Pic.Draw (stand1, x + 10, y - 7, picMerge)
%Pic.Draw (background, 0, 0, picMerge)
end knight
proc ninja
setscreen ("offscreenonly")
what := 0
locate (1, 85)
Input.KeyDown (chars2)
if chars2 ('w') then %jump
if yes then % true statment, if certan key is pressed then this happens, look below for key
for a : 1 .. 40 %jumping distance
y2 := y2 + 4 %jumping speed
View.Update % updates image, prevents flickering
cls %clears screen for new image
delay (5) % delays image
Pic.Draw (pic10, x2, y2, picMerge) % outputs image
end for
for a : 1 .. 40
y2 := y2 - 4
View.Update
cls
delay (5)
Pic.Draw (pic11, x2, y2, 2)
end for
for a : 1 .. 10
View.Update
cls
delay (5)
Pic.Draw (pic12, x2, y2, 2)
end for
else
for a : 1 .. 40
y2 := y2 + 3
View.Update
cls
delay (5)
Pic.Draw (pic10, x2, y2, 2)
end for
for a : 1 .. 40
y2 := y2 - 3
View.Update
cls
delay (5)
Pic.Draw (pic11, x2, y2, 2)
end for
for a : 1 .. 10
View.Update
cls
delay (5)
Pic.Draw (pic12, x2, y2, picMerge)
end for
end if
end if
if chars2 ('d') then %jumps certain direction
if chars2 ('g') then %differnt jump key
if yes then
for a : 1 .. 35
y2 := y2 + 4 %values for jumping on an angle
x2 := x2 + 4
View.Update
cls
delay (5)
Pic.Draw (pic10, x2, y2, picMerge)
end for
for a : 1 .. 35
y2 := y2 - 4
x2 := x2 + 4
View.Update
cls
delay (5)
Pic.Draw (pic11, x2, y2, picMerge)
end for
for a : 1 .. 10
View.Update
cls
delay (5)
Pic.Draw (pic12, x2, y2, picMerge)
end for
else
for a : 1 .. 35
y2 := y2 + 3
x2 := x2 + 3
View.Update
cls
delay (5)
Pic.Draw (pic10, x2, y2, picMerge)
end for
for a : 1 .. 35
y2 := y2 - 3
x2 := x2 + 3
View.Update
cls
delay (5)
Pic.Draw (pic11, x2, y2, picMerge)
end for
for a : 1 .. 10
View.Update
cls
delay (5)
Pic.Draw (pic12, x2, y2, picMerge)
end for
end if
end if
end if
if chars2 ('a') then
if chars2 ('g') then
if yes then
for a : 1 .. 35
y2 := y2 + 4
x2 := x2 - 4
View.Update
cls
delay (5)
Pic.Draw (pic13, x2, y2, picMerge)
end for
for a : 1 .. 35
y2 := y2 - 4
x2 := x2 - 4
View.Update
cls
delay (5)
Pic.Draw (pic14, x2, y2, picMerge)
end for
for a : 1 .. 10
View.Update
cls
delay (5)
Pic.Draw (pic15, x2, y2, picMerge)
end for
else
for a : 1 .. 35
y2 := y2 + 3
x2 := x2 - 3
View.Update
cls
delay (5)
Pic.Draw (pic13, x2, y2, picMerge)
end for
for a : 1 .. 35
y2 := y2 - 3
x2 := x2 + -3
View.Update
cls
delay (5)
Pic.Draw (pic14, x2, y2, picMerge)
end for
for a : 1 .. 10
View.Update
cls
delay (5)
Pic.Draw (pic15, x2, y2, picMerge)
end for
end if
end if
end if
if chars2 ('d') then % run certain direction
if yes then
what := 1 % assings value to varible, see last couple of lines for example
delay (75)
View.Update
cls
Pic.Draw (pic2, x2, y2, picMerge)
x2 := x2 + 30 %when image is outputed, image moves according to x or y axis
View.Update
cls
delay (75)
Pic.Draw (pic3, x2, y2, picMerge)
x2 := x2 + 30
View.Update
cls
delay (75)
Pic.Draw (pic4, x2, y2, picMerge)
x2 := x2 + 30
View.Update
cls
delay (75)
Pic.Draw (pic5, x2, y2, picMerge)
x2 := x2 + 30
else
what := 1
delay (75)
View.Update
cls
Pic.Draw (pic2, x2, y2, picMerge)
x2 := x2 + 10
View.Update
cls
delay (75)
Pic.Draw (pic3, x2, y2, picMerge)
x2 := x2 + 10
View.Update
cls
delay (75)
Pic.Draw (pic4, x2, y2, picMerge)
x2 := x2 + 10
View.Update
cls
delay (75)
Pic.Draw (pic5, x2, y2, picMerge)
x2 := x2 + 10
end if
end if
if chars2 ('a') then
if yes then % if yes:=true
for a : 1 .. 2
x2 := x2 - 30
View.Update
cls
delay (75)
Pic.Draw (pic6, x2, y2, picMerge)
x2 := x2 - 30
View.Update
cls
delay (75)
Pic.Draw (pic7, x2, y2, picMerge)
x2 := x2 - 30
View.Update
cls
delay (75)
Pic.Draw (pic8, x2, y2, picMerge)
x2 := x2 - 30
View.Update
cls
delay (75)
Pic.Draw (pic9, x2, y2, picMerge)
end for
View.Update
cls
Pic.Draw (pic1, x2, y2, picMerge)
else % if yes doesnt = 1 then this happens
for a : 1 .. 2
x2 := x2 - 10
View.Update
cls
delay (75)
Pic.Draw (pic6, x2, y2, picMerge)
x2 := x2 - 10
View.Update
cls
delay (75)
Pic.Draw (pic7, x2, y2, picMerge)
x2 := x2 - 10
View.Update
cls
delay (75)
Pic.Draw (pic8, x2, y2, picMerge)
x2 := x2 - 10
View.Update
cls
delay (75)
Pic.Draw (pic9, x2, y2, picMerge)
end for
View.Update
cls
Pic.Draw (pic1, x2, y2, picMerge)
end if
end if
if chars2 ('f') then
View.Update
cls
delay (75)
Pic.Draw (pic18, x2, y2, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic19, x2 - 5, y2 - 5, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic20, x2 - 5, y2 - 5, picMerge) % certain values for x,y to make pic fit more properly
View.Update
cls
delay (100)
Pic.Draw (pic21, x2 - 5, y2 - 5, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic22, x2 - 5, y2 - 5, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic23, x2 - 5, y2 - 5, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic24, x2 - 5, y2 - 5, picMerge)
end if
if chars2 ('s') then
cls
delay (100)
Pic.Draw (pic16, x2, y2, picMerge)
View.Update
cls
delay (500)
Pic.Draw (pic16, x2, y2, picMerge)
end if
if chars2 ('d') then
if chars2 ('h') then % two keys needs to be inputed for image to appear
View.Update
cls
Pic.Draw (pic30, x2, y2, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic31, x2, y2, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic32, x2, y2 - 3, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic33, x2, y2 - 6, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic34, x2, y2 - 7, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic35, x2, y2 - 9, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic36, x2, y2 - 11, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic37, x2 - 3, y2 - 9, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic38, x2, y2 - 10, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic39, x2, y2 - 5, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic40, x2, y2 - 5, picMerge) %
View.Update
cls
delay (100)
Pic.Draw (pic41, x2, y2 - 5, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic42, x2, y2 - 3, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic39, x2, y2 - 5, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic40, x2, y2 - 5, picMerge) %parts of image are repeated to add a nicer effect
View.Update
cls
delay (100)
Pic.Draw (pic41, x2, y2 - 5, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic42, x2, y2 - 3, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic43, x2, y2, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic44, x2, y2 - 7, picMerge)
x2 := x2 + 30
View.Update
cls
delay (100)
Pic.Draw (pic45, x2, y2, picMerge)
x2 := x2 + 30
View.Update
cls
delay (100)
Pic.Draw (pic46, x2, y2, picMerge)
x2 := x2 + 30
View.Update
cls
delay (100)
Pic.Draw (pic47, x2, y2, picMerge)
x2 := x2 + 30
View.Update
cls
delay (100)
Pic.Draw (pic48, x2, y2, picMerge)
x2 := x2 + 30
View.Update
cls
delay (100)
Pic.Draw (pic49, x2, y2, picMerge)
x2 := x2 + 30
View.Update
cls
delay (100)
Pic.Draw (pic50, x2, y2, picMerge)
x2 := x2 + 30
View.Update
cls
delay (100)
Pic.Draw (pic51, x2, y2, picMerge)
x2 := x2 + 30
View.Update
cls
delay (100)
Pic.Draw (pic52, x2, y2, picMerge)
View.Update
cls
delay (500)
Pic.Draw (pic52, x2, y2, picMerge)
end if
end if
if chars2 ('d') then
if chars2 ('a') then % so image doesnt draw twice,now image only does one thing even if
% left and right is pressed
what := 1
delay (5)
Pic.Draw (pic2, x2, y2, picMerge)
View.Update
cls
delay (5)
Pic.Draw (pic3, x2, y2, picMerge)
View.Update
cls
delay (5)
Pic.Draw (pic4, x2, y2, picMerge)
View.Update
cls
delay (5)
Pic.Draw (pic5, x2, y2, picMerge)
x2 := x2 + 2
end if
end if
if chars2 ('s') then
if chars2 ('h') then
yes := true % yes is true, now certain things will happen when this image is outputed
%able to combine this with if commands
View.Update
cls
delay (100)
Pic.Draw (pic53, x2, y2, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic54, x2, y2, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic55, x2, y2, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic53, x2, y2, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic54, x2, y2, picMerge)
View.Update
cls
delay (100)
Pic.Draw (pic55, x2, y2, picMerge)
end if
end if
View.Update
cls
Pic.Draw (pic1, x2, y2, picMerge)
%Pic.Draw (background, 0, 0, picMerge)
end ninja
loop
%cls
Pic.Draw (background, 0, 0, picMerge)
knight
ninja
end loop
|