
-----------------------------------
Mystify
Wed Nov 30, 2005 5:16 pm

Mega Man Animation
-----------------------------------
Hey guys this is my first ever animation what do you think of it... its just a basic Mega Man animation :wink:

-----------------------------------
iker
Wed Nov 30, 2005 6:23 pm


-----------------------------------
Its a pretty darn good looking animation, but your code could have been 
var mmnumber, x, y : int := 0
colorback (black)
cls
procedure animation
    cls
    %Pic.Draw (animation,x,y...
    %put "megaman...
    View.Update
    delay (150)
end animation

%...

%mmnumber := mm5
%x:=8
%y:=15
animation
%mmnumber := mm6
%x:=9
%y:=20
animation
%mmnumber := mm7
%x:=8
%y:=27
animation

%...


obviously I'm not going to tell you exactly how the code goes, so that you have the chance to figure it out. I hope that this does help you out, if not, just ask again and I'll give you another hint:D

anyways, its pretty basic how to do it, good luck!

-----------------------------------
do_pete
Thu Dec 01, 2005 11:39 am


-----------------------------------
Good job :clap:  You should put your pictures into an array and make you code less linear

-----------------------------------
AzureFire
Thu Dec 01, 2005 3:57 pm


-----------------------------------
yea, an array would be much better, because you could number your image variables and put in a for loop and call it with the counter, for example.


var megaman :array 1..10 of int
var x,y:int:=10
var font:int:=Font.New("serif:10")

%set each section of the array here
%using this example
megaman(1):=Pic.FileNew("pic1.bmp")
...
...


x:=0

for a:1..10 %note the 'a' counter
       Pic.Draw(megaman(a),x,y,picCopy)% put the 'a' counter in brackets after your array
       x+=1 %add one to 'x' variable this is the same as 'x:=x+1'
       Draw.Font("Mega Man Animation!",0,200,font,white)
       View.Update
       delay(150)
end for

That of course won't work as-is so you'll have to finish it, but remember you have to declare ALL of the array components.

-----------------------------------
RedRogueXIII
Sat Dec 03, 2005 4:14 pm


-----------------------------------
i have the same comments as the ppl above but im guessing you probably want to have the user control megaman. 

there are plenty of tutorials about moving a charcter so im going to skip the basics.

Just a little trick i think would be good for step by step animation when holding down one button.

in the loop have a count variable that increases everytime the loop cycles and your still holding down the button, when the count gets to a certain number then the picture changes,  when it reaches the end of the animation set then the count is turned back into 0 so it repeats if your still holding down the button.
